class_docstr: Type specification for a `tf.IndexedSlices`.
class_docstr_tok: ["Type","specification","for","a","`","tf.IndexedSlices","`","."]
code: def _from_components(self, tensor_list):
      if (
          all(isinstance(t, np.ndarray) for t in tensor_list)
          and not tf2.enabled()
      ):
          if len(tensor_list) == 2:
              return IndexedSlicesValue(
                  tensor_list[0], tensor_list[1], None
              )
          else:
              return IndexedSlicesValue(*tensor_list)
      else:
          return IndexedSlices(*tensor_list)
  
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 5 for calling the IndexedSlicesSpec obj's underlying member method code with example usage: obj._from_components(tensor_list) and returns: IndexedSlices, IndexedSlicesValue, IndexedSlicesValue