code: def dataclass(
      cls=None,
      *,
      init=True,
      repr=True,
      eq=True,
      order=False,
      unsafe_hash=False,
      frozen=False,
  ):
      """
      Custom dataclass wrapper for serde.
  
      This works similar to the ``dataclasses.dataclass`` and
      ``pydantic.dataclasses.dataclass`` decorators. Similar to the ``pydantic``
      version, this does type checking of arguments during runtime.
      """
  
      # assert frozen
      assert init
  
      if cls is None:
          return _dataclass
  
      return _dataclass(cls, init, repr, eq, order, unsafe_hash, frozen)
  
imports: import dataclasses
  import inspect
  from types import SimpleNamespace
  from typing import TYPE_CHECKING, cast, Any, Callable, ClassVar, Generic, TypeVar
  from gluonts.itertools import select
  from gluonts.pydantic import pydantic, dataclass
label_desc: Use image node_id 1 for calling a global function with example usage: dataclass(cls) and returns: _dataclass, _dataclass