code: def _pelita_member_filter(parent_name, item_names):
      
      filtered_names = []
  
      if parent_name not in sys.modules:
          return item_names
      module = sys.modules[parent_name]
  
      for item_name in item_names:
          item = getattr(module, item_name, None)
          location = getattr(item, '__module__', None)
  
          if location is None or (location + ".").startswith(parent_name + "."):
              filtered_names.append(item_name)
  
      return filtered_names
docs: Filter a list of autodoc items for which to generate documentation.
  
      Include only imports that come from the documented module or its
      submodules.