code: def load_cfg(cfg_to_load):
      """Wrapper around yaml.load used for maintaining backward compatibility"""
      assert isinstance(
          cfg_to_load, (file, basestring)
      ), "Expected {} or {} got {}".format(
          file, basestring, type(cfg_to_load)
      )
      if isinstance(cfg_to_load, file):
          cfg_to_load = "".join(cfg_to_load.readlines())
      if isinstance(cfg_to_load, basestring):
          for old_module, new_module in iteritems(_RENAMED_MODULES):
              # yaml object encoding: !!python/object/new:<module>.<object>
              old_module, new_module = (
                  "new:" + old_module,
                  "new:" + new_module,
              )
              cfg_to_load = cfg_to_load.replace(old_module, new_module)
      return yaml.load(cfg_to_load)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from ast import literal_eval
  from future.utils import iteritems
  from past.builtins import basestring
  import copy
  import logging
  import numpy
  import os
  import os.path
  import yaml
  from detectron.utils.collections import AttrDict
  from detectron.utils.io import cache_url
label_desc: Use image node_id 4 for calling a global function with example usage: load_cfg(cfg_to_load) and returns: yaml