code: def _repr_with_named_data(inst, **kwargs):
      """Convenient function to generate `repr` string with custom named data"""
      if six.PY2:
          class_name = inst.__class__.__name__
      else:
          class_name = inst.__class__.__qualname__
      return "<{}.{} {}>".format(
          inst.__module__,
          class_name,
          " ".join(
              "{}={}".format(k, v) for k, v in six.iteritems(kwargs)
          ),
      )
  
imports: import collections
  import contextlib
  import shutil
  import sys
  import tempfile
  import numpy
  import six
  import chainer
  from chainer.utils.array import size_of_shape
  from chainer.utils.array import sum_to
  from chainer.utils.conv import get_conv_outsize
  from chainer.utils.conv import get_deconv_outsize
  from chainer.utils.error import _format_array_props
  from chainer.utils.experimental import experimental
  from chainer.utils.meta import enable_final
  from chainer.utils.meta import final
  from chainer.utils.nondeterministic import nondeterministic
  from chainer.utils.sparse import CooMatrix
  from chainer.utils.sparse import get_order
  from chainer.utils.sparse import to_coo
label_desc: Use image node_id 4 for calling a global function with example usage: _repr_with_named_data(inst) and returns: str