code: def _import_object_from_name(fullname):
      comps = fullname.split(".")
      obj = sys.modules.get(comps[0])
      if obj is None:
          raise RuntimeError("Can't import {}".format(comps[0]))
      for i, comp in enumerate(comps[1:]):
          obj = getattr(obj, comp)
          if obj is None:
              raise RuntimeError(
                  "Can't find object {}".format(
                      ".".join(comps[: i + 1])
                  )
              )
      return obj
  
file_path: chainer/chainer/testing/helper.py
imports: import contextlib
  import sys
  import unittest
  import warnings
  import pkg_resources
label_desc: Use image node_id 5 for calling a global function with example usage: _import_object_from_name(fullname) and returns: obj