code: def has_default_eq(
      obj: object,
  ) -> bool:
      """Check if an instance of an object contains the default eq
  
      First, we check if the object's __eq__ attribute has __code__,
      if so, we check the equally of the method code filename (__code__.co_filename)
      to the default one generated by the dataclass and attr module
      for dataclasses the default co_filename is <string>, for attrs class, the __eq__ should contain "attrs eq generated"
      """
      # inspired from https://github.com/willmcgugan/rich/blob/07d51ffc1aee6f16bd2e5a25b4e82850fb9ed778/rich/pretty.py#L68
      if hasattr(obj.__eq__, "__code__") and hasattr(
          obj.__eq__.__code__, "co_filename"
      ):
          code_filename = obj.__eq__.__code__.co_filename
  
          if isattrs(obj):
              return "attrs generated eq" in code_filename
  
          return code_filename == "<string>"  # data class
      return True
  
imports: import collections.abc
  import os
  import pprint
  from typing import AbstractSet
  from typing import Any
  from typing import Callable
  from typing import Iterable
  from typing import List
  from typing import Mapping
  from typing import Optional
  from typing import Sequence
  from unicodedata import normalize
  import _pytest._code
  from _pytest import outcomes
  from _pytest._io.saferepr import _pformat_dispatch
  from _pytest._io.saferepr import saferepr
  from _pytest._io.saferepr import saferepr_unlimited
  from _pytest.config import Config
label_desc: Use image node_id 12 for calling a global function with example usage: has_default_eq(obj) and returns: True, unknown, unknown