docstr: An implementation similar to ``__import__``. Use `follow`
  to actually follow the imports.
  
  *level* specifies whether to use absolute or relative imports. 0 (the
  default) means only perform absolute imports. Positive values for level
  indicate the number of parent directories to search relative to the
  directory of the module calling ``__import__()`` (see PEP 328 for the
  details).
  
  :param import_path: List of namespaces (strings or Names).
docstr_tok: ["An","implementation","similar","to","``","__import__","``",".","Use","`","follow","`","to","actually","follow","the","imports",".","*","level","*","specifies","whether","to","use","absolute","or","relative","imports",".","0","(","the","default",")","means","only","perform","absolute","imports",".","Positive","values","for","level","indicate","the","number","of","parent","directories","to","search","relative","to","the","directory","of","the","module","calling","``","__import__","(",")","``","(","see","PEP","328","for","the","details",")",".",":","param","import_path",":","List","of","namespaces","(","strings","or","Names",")","."]
code: def __init__(self, evaluator, import_path, module_context, level=0):
      """
      An implementation similar to ``__import__``. Use `follow`
      to actually follow the imports.
  
      *level* specifies whether to use absolute or relative imports. 0 (the
      default) means only perform absolute imports. Positive values for level
      indicate the number of parent directories to search relative to the
      directory of the module calling ``__import__()`` (see PEP 328 for the
      details).
  
      :param import_path: List of namespaces (strings or Names).
      """
      debug.speed("import %s" % (import_path,))
      self._evaluator = evaluator
      self.level = level
      self.module_context = module_context
      try:
          self.file_path = module_context.py__file__()
      except AttributeError:
          # Can be None for certain compiled modules like 'builtins'.
          self.file_path = None
  
      if level:
          base = module_context.py__package__().split(".")
          if base == [""] or base == ["__main__"]:
              base = []
          if level > len(base):
              path = module_context.py__file__()
              if path is not None:
                  import_path = list(import_path)
                  p = path
                  for i in range(level):
                      p = os.path.dirname(p)
                  dir_name = os.path.basename(p)
                  # This is not the proper way to do relative imports. However, since
                  # Jedi cannot be sure about the entry point, we just calculate an
                  # absolute path here.
                  if dir_name:
                      # TODO those sys.modules modifications are getting
                      # really stupid. this is the 3rd time that we're using
                      # this. We should probably refactor.
                      if path.endswith(os.path.sep + "os.py"):
                          import_path.insert(0, "os")
                      else:
                          import_path.insert(0, dir_name)
                  else:
                      _add_error(
                          module_context,
                          import_path[-1],
                          message="Attempted relative import beyond top-level package.",
                      )
                      import_path = []
              # If no path is defined in the module we have no ideas where we
              # are in the file system. Therefore we cannot know what to do.
              # In this case we just let the path there and ignore that it's
              # a relative path. Not sure if that's a good idea.
          else:
              # Here we basically rewrite the level to 0.
              base = tuple(base)
              if level > 1:
                  base = base[: -level + 1]
  
              import_path = base + tuple(import_path)
      self.import_path = import_path
  
imports: import os
  from parso.python import tree
  from parso.tree import search_ancestor
  from parso import python_bytes_to_unicode
  from jedi._compatibility import FileNotFoundError, ImplicitNSInfo, force_unicode, unicode
  from jedi import debug
  from jedi import settings
  from jedi.parser_utils import get_cached_code_lines
  from jedi.evaluate import sys_path
  from jedi.evaluate import helpers
  from jedi.evaluate import compiled
  from jedi.evaluate import analysis
  from jedi.evaluate.utils import unite
  from jedi.evaluate.cache import evaluator_method_cache
  from jedi.evaluate.filters import AbstractNameDefinition
  from jedi.evaluate.base_context import ContextSet, NO_CONTEXTS
label_desc: Use image node_id 1 to create a new Importer object from inherited base classes: object with example: obj = Importer(evaluator, import_path, module_context, level)