code: def _get_spec(finder, name):
      """Return the finder-specific module spec."""
      # Works with legacy finders.
      try:
          find_spec = finder.find_spec
      except AttributeError:
          loader = finder.find_module(name)
          if loader is None:
              return None
          return importlib.util.spec_from_loader(name, loader)
      else:
          return find_spec(name)
  
imports: from collections import namedtuple
  from functools import singledispatch
  import importlib
  import importlib.util
  import importlib.machinery
  import os
  import os.path
  import sys
  from types import ModuleType
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _get_spec(finder, name) and returns: find_spec, importlib, None