Returns-->dict or None

def __get_config():
    '''
    Returns-->dict or None
    '''
    if 'config' not in globals():
        return None
    cfg = globals().get('config', None)
    if cfg is None:
        return None

    if not isinstance(cfg, dict):
        return None
    return cfg