code: def _find_module(module):
      """Find module using imp.find_module.
  
      While imp is deprecated, it provides a Python 2/3 compatible
      interface for finding a module. We use the result later to load
      the module with imp.load_module with the '__main__' name, causing
      it to execute.
  
      The non-deprecated method of using importlib.util.find_spec and
      loader.execute_module is not supported in Python 2.
  
      The _find_module implementation uses a novel approach to bypass
      imp.find_module's requirement that package directories contain
      __init__.py/__init__.pyc markers. This lets users specify
      namespace packages in main modules, which are not otherwise
      supported by imp.find_module.
      """
      parts = module.split(".")
      module_path = parts[0:-1]
      package = ".".join(module_path)
      module_name_part = parts[-1]
      # See function docstring for the rationale of this algorithm.
      for sys_path_item in sys.path:
          cur_path = os.path.join(sys_path_item, *module_path)
          try:
              f, path, _desc = imp.find_module(
                  module_name_part, [cur_path]
              )
          except ImportError:
              pass
          else:
              if f:
                  f.close()
              else:
                  path = _find_package_main(path)
                  if path is None:
                      raise ImportError(
                          f"No module named {module}.__main__ ('{module}' is "
                          "a package and cannot be directly executed)"
                      )
              return ModuleInfo(path, package)
      raise ImportError(f"No module named {module}")
  
imports: import warnings
  import logging
  import os
  import pdb
  import sys
  import traceback
  from guild import exit_code
  from guild import op_util
  from guild import util
label_desc: Use image node_id 15 for calling a global function with example usage: _find_module(module) and returns: ModuleInfo