class_docstr: Return selected values in ``ls`` as a packed ``Tensor``.
  
  Parameters
  ----------
  ls: List[\*] (Required)
  
  indices: <K,i32> (Required)
      * Gather from indices, whose element must be in ``[0, ls.length)`` at runtime.
  
  Returns
  -------
  <\*K,T>
      * Selected tensors packed into a ``len(ls.elem_shape)+1`` rank tensor.
      * ``K[0] == len(indices)``.
  
  Attributes
  ----------
  T: fp16, fp32, i32, bool
class_docstr_tok: ["Return","selected","values","in","``","ls","``","as","a","packed","``","Tensor","``",".","Parameters","--","--","--","--","--","ls",":","List","[","\\","*","]","(","Required",")","indices",":","<","K",",","i32",">","(","Required",")","*","Gather","from","indices",",","whose","element","must","be","in","``","[","0",",","ls.length",")","``","at","runtime",".","Returns","--","--","--","-","<","\\","*","K",",","T",">","*","Selected","tensors","packed","into","a","``","len","(","ls.elem_shape",")","+1","``","rank","tensor",".","*","``","K","[","0","]","==","len","(","indices",")","``",".","Attributes","--","--","--","--","--","T",":","fp16",",","fp32",",","i32",",","bool"]
code: def type_inference(self):
      list_elem_type = self.ls.elem_type
      if list_elem_type == types.unknown:
          msg = (
              "Unknown element type. The List might not have been "
              + "written to ({})"
          )
          raise ValueError(msg.format(self.name))
      elem_shape = list_elem_type.get_shape()
      dtype = list_elem_type.get_primitive()
      ret_shape = [self.indices.shape[0]] + list(elem_shape)
      return types.tensor(dtype, tuple(ret_shape))
  
imports: import copy
  import numpy
  from coremltools import _logger
  from coremltools.converters.mil.mil import Block, get_existing_symbol, get_new_symbol, types
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, InternalInputType, ListInputType, PyFunctionInputType, TensorInputType, TupleInputType
  from coremltools.converters.mil.mil.operation import NONE, SYMBOL, VALUE, Operation, mil_list, precondition
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.ops.defs._utils import infer_type_with_broadcast, promoted_primitive_type
  from coremltools.converters.mil.mil.types import is_compatible_type
  from coremltools.converters.mil.mil.types.type_list import list
  from coremltools.converters.mil.mil.types.type_mapping import builtin_to_string, is_subtype, numpy_type_to_builtin_type, numpy_val_to_builtin_val
label_desc: Use image node_id 1 for calling the list_gather obj's underlying member method code with example usage: obj.type_inference() and returns: types