code: def dataclass(
      cls=None,
      /,
      *,
      init=True,
      repr=True,
      eq=True,
      order=False,
      unsafe_hash=False,
      frozen=False,
      match_args=True,
      kw_only=False,
      slots=False,
      weakref_slot=False,
  ):
      """Add dunder methods based on the fields defined in the class.
  
      Examines PEP 526 __annotations__ to determine fields.
  
      If init is true, an __init__() method is added to the class. If repr
      is true, a __repr__() method is added. If order is true, rich
      comparison dunder methods are added. If unsafe_hash is true, a
      __hash__() method is added. If frozen is true, fields may not be
      assigned to after instance creation. If match_args is true, the
      __match_args__ tuple is added. If kw_only is true, then by default
      all fields are keyword-only. If slots is true, a new class with a
      __slots__ attribute is returned.
      """
  
      def wrap(cls):
          return _process_class(
              cls,
              init,
              repr,
              eq,
              order,
              unsafe_hash,
              frozen,
              match_args,
              kw_only,
              slots,
              weakref_slot,
          )
  
      # See if we're being called as @dataclass or @dataclass().
      if cls is None:
          # We're called with parens.
          return wrap
  
      # We're called as @dataclass without parens.
      return wrap(cls)
  
imports: import re
  import sys
  import copy
  import types
  import inspect
  import keyword
  import builtins
  import functools
  import itertools
  import abc
  import _thread
  from types import FunctionType, GenericAlias
label_desc: Use image node_id 29 for calling a global function with example usage: dataclass() and returns: wrap, _process_class, wrap