code: def _ensure_shape_tuple(t):
      try:
          return tuple(int(x) for x in onp.array(t))
      except TypeError:
          pass
      try:
          return (int(onp.array(t)),)
      except TypeError:
          pass
      raise TypeError(
          "Non-shape-like value: {} (type {})".format(t, type(t))
      )
  
imports: import numpy
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import _utils
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy.numpy_math import softmax
label_desc: Use image node_id 1 for calling a global function with example usage: _ensure_shape_tuple(t) and returns: tuple, int