code: def _format_val(val):
      if not hasattr(val, "shape"):
          return repr(val)
      shape = ",".join(map(str, val.shape))
      dtype = utils.simple_dtype(val.dtype)
      return f"{dtype}[{shape}]"
  
imports: import collections
  import contextlib
  import functools
  import html
  from typing import Any, Callable, NamedTuple, Optional
  from haiku._src import data_structures
  from haiku._src import module
  from haiku._src import utils
  import jax
  import jax.core
  from jax.experimental import pjit
  from jax.extend import linear_util
label_desc: Use image node_id 6 for calling a global function with example usage: _format_val(val) and returns: dtype, str, shape, str, repr