code: def _pformat_dataclass(obj, **kwargs) -> pp.Doc:
      # <uninitialised> can happen when typechecking an `eqx.Module`'s `__init__` method
      # with beartype, and printing args using pytest. We haven't yet actually assigned
      # values to the module so the repr fails.
      objs = named_objs(
          [
              (
                  field.name,
                  getattr(
                      obj, field.name, WithRepr(None, "<uninitialised>")
                  ),
              )
              for field in dataclasses.fields(obj)
              if field.repr
          ],
          **kwargs,
      )
      return bracketed(
          name=pp.text(obj.__class__.__name__),
          indent=kwargs["indent"],
          objs=objs,
          lbracket="(",
          rbracket=")",
      )
  
imports: import dataclasses
  import functools
  import sys
  import types
  from collections.abc import Callable, Sequence
  from typing import Any, Optional, Union
  import jax
  import jax._src.pretty_printer
  import jax.tree_util
  import numpy
  from jaxtyping import PyTree
  from ._doc_utils import WithRepr
label_desc: Use image node_id 12 for calling a global function with example usage: _pformat_dataclass(obj) and returns: bracketed