code: def file_info_from_modpath(modpath, path=None, context_file=None):
      
      if context_file is not None:
          context = os.path.dirname(context_file)
      else:
          context = context_file
      if modpath[0] == "xml":
          # handle _xmlplus
          try:
              return _spec_from_modpath(["_xmlplus"] + modpath[1:], path, context)
          except ImportError:
              return _spec_from_modpath(modpath, path, context)
      elif modpath == ["os", "path"]:
          # FIXME: currently ignoring search_path...
          return spec.ModuleSpec(
              name="os.path", location=os.path.__file__, module_type=imp.PY_SOURCE
          )
      return _spec_from_modpath(modpath, path, context)
docs: given a mod path (i.e. split module / package name), return the
      corresponding file, giving priority to source file over precompiled
      file if it exists
  
      :type modpath: list or tuple
      :param modpath:
        split module's name (i.e name of a module or package split
        on '.')
        (this means explicit relative imports that start with dots have
        empty strings in this list!)
  
      :type path: list or None
      :param path:
        optional list of path where the module or package should be
        searched (use sys.path if nothing or None is given)
  
      :type context_file: str or None
      :param context_file:
        context file to consider, necessary if the identifier has been
        introduced using a relative import unresolvable in the actual
        context (i.e. modutils)
  
      :raise ImportError: if there is no such module in the directory
  
      :rtype: (str or None, import type)
      :return:
        the path to the module's file or None if it's an integrated
        builtin module such as 'sys'