def METHOD_NAME(name):
    """
    Return the value of global variable ``name``. Raise ``NameError``
    if there is no such global variable.
    INPUT:
    - ``name`` -- a string representing a variable name
    OUTPUT: the value of variable ``name``
    EXAMPLES::
        sage: from sage.repl.user_globals import get_global
        sage: the_answer = 42
        sage: get_global("the_answer")
        42
        sage: get_global("the_question")
        Traceback (most recent call last):
        ...
        NameError: name 'the_question' is not defined
    """
    _check()
    try:
        return user_globals[name]
    except KeyError:
        raise NameError("name {!r} is not defined".format(name))