def set_global_cfg(cfg: CfgNode) -> None:
    '\n    Let the global config point to the given cfg.\n\n    Assume that the given "cfg" has the key "KEY", after calling\n    `set_global_cfg(cfg)`, the key can be accessed by:\n    ::\n        from detectron2.config import global_cfg\n        print(global_cfg.KEY)\n\n    By using a hacky global config, you can access these configs anywhere,\n    without having to pass the config object or the values deep into the code.\n    This is a hacky feature introduced for quick prototyping / research exploration.\n    '
    global global_cfg
    global_cfg.clear()
    global_cfg.update(cfg)
Let the global config point to the given cfg.

Assume that the given "cfg" has the key "KEY", after calling
`set_global_cfg(cfg)`, the key can be accessed by:
::
    from detectron2.config import global_cfg
    print(global_cfg.KEY)

By using a hacky global config, you can access these configs anywhere,
without having to pass the config object or the values deep into the code.
This is a hacky feature introduced for quick prototyping / research exploration.
def set_global_cfg(cfg: CfgNode) -> None:
    '\n    Let the global config point to the given cfg.\n\n    Assume that the given "cfg" has the key "KEY", after calling\n    `set_global_cfg(cfg)`, the key can be accessed by:\n    ::\n        from detectron2.config import global_cfg\n        print(global_cfg.KEY)\n\n    By using a hacky global config, you can access these configs anywhere,\n    without having to pass the config object or the values deep into the code.\n    This is a hacky feature introduced for quick prototyping / research exploration.\n    '
    global global_cfg
    global_cfg.clear()
    global_cfg.update(cfg)