code: def resolve_name(name, package):
      """Resolve a relative module name to an absolute one."""
      if not name.startswith("."):
          return name
      elif not package:
          raise ImportError(
              f"no package specified for {repr(name)} "
              "(required for relative module names)"
          )
      level = 0
      for character in name:
          if character != ".":
              break
          level += 1
      return _resolve_name(name[level:], package, level)
  
imports: from ._abc import Loader
  from ._bootstrap import module_from_spec
  from ._bootstrap import _resolve_name
  from ._bootstrap import spec_from_loader
  from ._bootstrap import _find_spec
  from ._bootstrap_external import MAGIC_NUMBER
  from ._bootstrap_external import _RAW_MAGIC_NUMBER
  from ._bootstrap_external import cache_from_source
  from ._bootstrap_external import decode_source
  from ._bootstrap_external import source_from_cache
  from ._bootstrap_external import spec_from_file_location
  from contextlib import contextmanager
  import _imp
  import functools
  import sys
  import types
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: resolve_name(name, package) and returns: _resolve_name, name