docs: def contains(container, item):
      """Extends ``operator.contains`` by trying very hard to find ``item`` inside container."""
  
      # equality counts as containment and is usually non destructive
      if container == item:
          return True
  
      # testing mapping containment is usually non destructive
      if isinstance(container, abc.Mapping) and mapping_contains(container, item):
          return True
  
      # standard containment except special cases
      if isinstance(container, str):
          # str __contains__ includes substring match that we don't count as containment
          if strict_contains(container, item):
              return True
      else:
          try:
              if item in container:
                  return True
          except Exception:
              pass
  
      # search matches in generic instances
      return instance_contains(container, item)