def merge_config(config, another_cfg=None):
    """
    Merge config into global config or another_cfg.

    Args:
        config (dict): Config to be merged.

    Returns: global config
    """
    global global_config
    dct = another_cfg or global_config
    return dict_merge(dct, config)

    Merge config into global config or another_cfg.

    Args:
        config (dict): Config to be merged.

    Returns: global config
    
ppdet/core/workspace.py