code: def internal_convert_n_to_tensor_or_indexed_slices(
      values, dtype=None, name=None, as_ref=False
  ):
      """Converts `values` to a list of `Tensor` or `IndexedSlices` objects.
  
      Any `IndexedSlices` or `SparseTensor` objects in `values` are returned
      unmodified.
  
      Args:
        values: An iterable of `None`, `IndexedSlices`, `SparseTensor`, or objects
          that can be consumed by `convert_to_tensor()`.
        dtype: (Optional.) The required `DType` of the returned `Tensor` or
          `IndexedSlices`.
        name: (Optional.) A name prefix to used when a new `Tensor` is created, in
          which case element `i` will be given the name `name + '_' + i`.
        as_ref: True if the caller wants the results as ref tensors.
  
      Returns:
        A list of `Tensor`, `IndexedSlices`, `SparseTensor` and/or `None` objects.
  
      Raises:
        TypeError: If no conversion function is registered for an element in
          `values`.
        RuntimeError: If a registered conversion function returns an invalid
          value.
      """
      if not isinstance(values, collections_abc.Iterable):
          raise TypeError("Argument `values` must be iterable.")
      ret = []
      for i, value in enumerate(values):
          if value is None:
              ret.append(value)
          else:
              n = None if name is None else "%s_%d" % (name, i)
              ret.append(
                  internal_convert_to_tensor_or_indexed_slices(
                      value, dtype=dtype, name=n, as_ref=as_ref
                  )
              )
      return ret
  
imports: import collections
  import warnings
  import numpy
  from tensorflow.core.protobuf import struct_pb2
  from tensorflow.python import tf2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import composite_tensor_gradient
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion_registry
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.saved_model import nested_structure_coder
  from tensorflow.python.types import internal
  from tensorflow.python.util.compat import collections_abc
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling a global function with example usage: internal_convert_n_to_tensor_or_indexed_slices(values, dtype, name, as_ref) and returns: ret