def _global_config(config, settings=None, avail=None):
    """
     _global_config: obj -> obj
     
    ---------------------------------------------------------------
     
     Sets the local [config] to the global [settings] if a global
     setting exists. If all local [config] has been set, this function
     returns the original [config] or if no [settings] and [avail] settings
     exist.
     
     Required Parameters
     -------------------
     * config: obj
             The configobj instance object to scan if defaults
             have been customized.
             
     Optional Parameters
     -------------------
     * settings: None OR obj
             The global settings to use if it exists, otherwise
             use the defaults.
     * avail: None OR (listof str)
             The available [config] keys to set. Only these keys
             will be set to global defaults if they exist.
    
     Returns
     -------
     * config: obj
             The configobj instance after defaults have been set
             if applicable.
     
    ---------------------------------------------------------------
    """
    if settings is not None and avail is not None:
        for k in settings.keys():
            if k not in config and k in avail:
                config[k] = settings[k]
    return config