code: def _package_path(name):
      
      loader = pkgutil.get_loader(name)
      if loader is None or name == '__main__':
          return None
  
      if hasattr(loader, 'get_filename'):
          filepath = loader.get_filename(name)
      else:
          # Fall back to importing the specified module.
          __import__(name)
          filepath = sys.modules[name].__file__
  
      return os.path.dirname(os.path.abspath(filepath))
docs: Returns the path to the package containing the named module or
      None if the path could not be identified (e.g., if
      ``name == "__main__"``).