code: def default_filter(name, obj):
      """Attribute filter.
  
      It filters out module attributes, and also methods starting with an
      underscore ``_``.
  
      This is used as the default filter for the :func:`create_patches` function
      and the :func:`patches` decorator.
  
      Parameters
      ----------
      name : str
          Attribute name.
      obj : object
          Attribute value.
  
      Returns
      -------
      bool
          Whether the attribute should be returned.
      """
      return not (
          isinstance(obj, types.ModuleType) or name.startswith("_")
      )
  
imports: import collections
  import copy
  import inspect
  import logging
  import pkgutil
  import sys
  import types
label_desc: Use image node_id 3 for calling a global function with example usage: default_filter(name, obj) and returns: unknown