code: def _pformat_namedtuple(obj: NamedTuple, **kwargs) -> pp.Doc:
      objs = named_objs(
          [(name, getattr(obj, name)) for name in obj._fields], **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 5 for calling a global function with example usage: _pformat_namedtuple(obj) and returns: bracketed