<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_global_settings():
 """Makes sure that the global settings environment variable and file exist for configuration. """

    global settings
    if settings is not None:
        #We must have already loaded this and everything was okay!
        return True
    
    from os import getenv
    result = False
    
    if getenv("PYCI_XML") is None:
        err("The environment variable PYCI_XML for the global configuration "
            "has not been set.")
    else:
        from os import path
        fullpath = path.abspath(path.expanduser(getenv("PYCI_XML")))
        if not path.isfile(fullpath):
            err("The file {} for global configuration does not exist.".format(fullpath))
        else:
            from pyci.config import GlobalSettings
            settings = GlobalSettings()
            result = True

    return result