Where exactly do I need to 'Adjust the timeout' ....

Need to adjust timeout but I'm not sure where to include the suggest code. My child theme does includes only a css file while the theme folder has a large function.php file.

Can I add

function wpmudev_increase_timeout ($timeout) {
return 180; // the timeout’s measured in seconds, so 180 = 3 minutes
}

anywhere or do I have to place it at the beginning or should I include it at the end of that file?

Please advice.
Thank you.
Steven