code: def _declare_namespace(self, package_name):
      '''
      Mock for #pkg_resources.declare_namespace() which calls
      #pkgutil.extend_path() afterwards as the original implementation doesn't
      seem to properly find all available namespace paths.
      '''
  
      self.state['declare_namespace'](package_name)
      mod = sys.modules[package_name]
      mod.__path__ = pkgutil.extend_path(mod.__path__, package_namef _declare_namespace(self, package_name):
      '''
      Mock for #pkg_resources.declare_namespace() which calls
      #pkgutil.extend_path() afterwards as the original implementation doesn't
      seem to properly find all available namespace paths.
      '''
  
      self.state['declare_namespace'](package_name)
      mod = sys.modules[package_name]
      mod.__path__ = pkgutil.extend_path(mod.__path__, package_name)
docs: Mock for #pkg_resources.declare_namespace() which calls
      #pkgutil.extend_path() afterwards as the original implementation doesn't
      seem to properly find all available namespace paths.