code: def import_object(name):
      # type: (_BaseString) -> Any
      """Imports an object by name.
  
      import_object('x') is equivalent to 'import x'.
      import_object('x.y.z') is equivalent to 'from x.y import z'.
  
      >>> import tornado.escape
      >>> import_object('tornado.escape') is tornado.escape
      True
      >>> import_object('tornado.escape.utf8') is tornado.escape.utf8
      True
      >>> import_object('tornado') is tornado
      True
      >>> import_object('tornado.missing_module')
      Traceback (most recent call last):
          ...
      ImportError: No module named missing_module
      """
      if not isinstance(name, str):
          # on python 2 a byte string is required.
          name = name.encode("utf-8")
      if name.count(".") == 0:
          return __import__(name, None, None)
  
      parts = name.split(".")
      obj = __import__(".".join(parts[:-1]), None, None, [parts[-1]], 0)
      try:
          return getattr(obj, parts[-1])
      except AttributeError:
          raise ImportError("No module named %s" % parts[-1])
  
imports: from __future__ import absolute_import, division, print_function
  import array
  import atexit
  import os
  import re
  import sys
  import zlib
label_desc: Use image node_id 1 for calling a global function with example usage: import_object(name) and returns: __import__, getattr