class_docstr: Gather slices from input ``x`` along dimension ``axis`` according to ``indices``, similar to ``tf.gather``.
  
  If ``indices`` is scalar (0-D):
  ``output[p_0, ..., p_{axis-1},            ,p_{axis+1}, ..., p_{rank(x)-1}]
  = x[p_0, ..., p_{axis-1}, indices, p_{axis+1}, ..., p_{rank(x)-1}]``
  where ``rank(x)`` is the rank of ``x``.
  
  The output has rank ``rank(x) - 1``.
  
  If indices is 1-D tensor:
  ``output[p_0, ..., p_{axis-1},            i, p_{axis+1}, ..., p_{rank(*D)-1}]
  = x[p_0, ..., p_{axis-1}, indices[i], p_{axis+1}, ..., p_{rank(*D)-1}]``.
  The output has rank ``rank(x)``.
  
  In general,
  ``output[p_0, ..., p_{axis-1},           i_0, ..., i_{M-1} , p_{axis+1}, ..., p_{rank(x)-1}]
  = x[p_0, ..., p_{axis-1}, indices[i_0, ..., i_{M-1}], p_{axis+1}, ..., p_{rank(x)-1}]``.
  
  where ``M = rank(x)``.
  
  Parameters
  ----------
  * x: tensor<*D,T> (Required)
  * indices: tensor<*N,i32> (Required)
      * Indices values may be negative. More precisely, ``-D[axis]<= v < D[axis]`` for ``v`` in ``indices``.
  * axis: const i32 (Optional)
      * Default to ``0``.
  
  Returns
  -------
  tensor<*K,T>
      * where ``K = D[:axis] + N + D[axis+1:]``.
  
  Attributes
  ----------
  T: fp32
code: def type_inference(self):
      out_type = self.x.dtype
  
      if self.axis.val < -self.x.rank or self.axis.val >= self.x.rank:
          raise IndexError(
              "Axis value {} is out of bounds for {} node {}".format(
                  self.axis.val, self.op_type, self.name
              )
          )
  
      output_rank = self.x.rank - 1 + self.indices.rank
      if output_rank == 0:
          # output scalar
          return out_type
  
      axis = self.axis.val
      axis = axis if axis >= 0 else axis + self.x.rank
      out_shape = (
          self.x.shape[:axis]
          + self.indices.shape
          + self.x.shape[axis + 1 :]
      )
      return types.tensor(out_type, out_shape)
  
imports: from coremltools.converters.mil.mil import SYMBOL, VALUE
  from coremltools.converters.mil.mil.types.symbolic import is_compatible_symbolic_vector
  from ._op_reqs import *
  import numbers
label_desc: Use image node_id 3 for calling the gather obj's underlying member method code with example usage: obj.type_inference() and returns: types, out_type