class_docstr: Slicing input tensor with given ``size`` for each rank.
  
  Parameters
  ----------
  x: tensor<*?, T> (Required)
      * Input tensor.
  begin: tensor<[rank(x)], i32> Required
      * The begin index for slice.
  size: tensor<[rank(x)], i32> Required
      * The size that is to be sliced. If ``size`` is ``-1``, we slice all the remaining elements.
  
  Returns
  -------
  tensor<*?, T>
      * Scalar or tensor. Same type as the input tensor.
  
  Attributes
  ----------
  T: fp32
code: def value_inference(self):
      if any_symbolic(self.begin.sym_val):
          return None
      if any_symbolic(self.size.sym_val):
          return None
      if self.x.val is None:
          return None
      slices = []
      for i in range(self.x.rank):
          begin_val = self.begin.val[i]
          if begin_val < 0:
              if is_symbolic(self.x.shape[i]):
                  return None
              begin_val += self.x.shape[i]
          if self.size.val[i] > 0:
              slices.append(
                  slice(begin_val, begin_val + self.size.val[i])
              )
          else:
              slices.append(slice(begin_val, None, None))
      return self.x.val[tuple(slices)]
  
imports: import functools
  import sympy
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic, isscalar, any_symbolic, any_variadic
  from coremltools.converters.mil.mil import get_new_symbol, get_new_variadic_symbol, VALUE, SYMBOL, types
  from ._op_reqs import *
label_desc: Use image node_id 3 for calling the slice_by_size obj's underlying member method code with example usage: obj.value_inference() and returns: self, None, None, None, None