Since $context is a global variable, there's no need to return it here - you can just set it and it'll be accessible immediately after calling the function.