code: def _ensure_list(tensor_or_list):
      """Converts the input arg to a list if it is not a list already.
  
      Args:
        tensor_or_list: A `Tensor` or a Python list of `Tensor`s. The argument to
          convert to a list of `Tensor`s.
  
      Returns:
        A tuple of two elements. The first is a Python list of `Tensor`s containing
        the original arguments. The second is a boolean indicating whether
        the original argument was a list or tuple already.
      """
      if isinstance(tensor_or_list, (list, tuple)):
          return list(tensor_or_list), True
      return [tensor_or_list], False
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.util import seed_stream
label_desc: Use image node_id 11 for calling a global function with example usage: _ensure_list(tensor_or_list) and returns: list,  False, list,  True