code: def _compare_eq_cls(left: Any, right: Any, verbose: int) -> List[str]:
      if not has_default_eq(left):
          return []
      if isdatacls(left):
          import dataclasses
  
          all_fields = dataclasses.fields(left)
          fields_to_check = [
              info.name for info in all_fields if info.compare
          ]
      elif isattrs(left):
          all_fields = left.__attrs_attrs__
          fields_to_check = [
              field.name for field in all_fields if getattr(field, "eq")
          ]
      elif isnamedtuple(left):
          fields_to_check = left._fields
      else:
          assert False
  
      indent = "  "
      same = []
      diff = []
      for field in fields_to_check:
          if getattr(left, field) == getattr(right, field):
              same.append(field)
          else:
              diff.append(field)
  
      explanation = []
      if same or diff:
          explanation += [""]
      if same and verbose < 2:
          explanation.append(
              "Omitting %s identical items, use -vv to show" % len(same)
          )
      elif same:
          explanation += ["Matching attributes:"]
          explanation += pprint.pformat(same).splitlines()
      if diff:
          explanation += ["Differing attributes:"]
          explanation += pprint.pformat(diff).splitlines()
          for field in diff:
              field_left = getattr(left, field)
              field_right = getattr(right, field)
              explanation += [
                  "",
                  "Drill down into differing attribute %s:" % field,
                  ("%s%s: %r != %r")
                  % (indent, field, field_left, field_right),
              ]
              explanation += [
                  indent + line
                  for line in _compare_eq_any(
                      field_left, field_right, verbose
                  )
              ]
      return explanation
  
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 21 for calling a global function with example usage: _compare_eq_cls(left, right, verbose) and returns: explanation, list