code: def is_namedtuple_like(x):
      """Helper which returns `True` if input is `collections.namedtuple`-like."""
      try:
          for fn in x._fields:
              _ = getattr(x, fn)
          return True
      except AttributeError:
          return False
  
imports: import warnings
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import broadcast_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math.gradient import value_and_gradient
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 3 for calling a global function with example usage: is_namedtuple_like(x) and returns: True, False