class_docstr: Reshape a tensor to an output shape specified by some or all dimensions of a tuple of reference tensors ``ref_tensors``.
  
  Parameters
  ----------
  x: tensor<\*?, T> (Required)
      * The input tensor to be reshaped.
  
  ref_tensors: Tuple[tensor<\*?, R>] (Required)
      * A tuple of tensors that define the output shape.
  
  begins: Tuple[const<int32>] (Required)
      * A tuple of integers specifying the begin index into the shape vector of the corresponding ``ref_tensor``.
  
  ends: Tuple[const<int32>] (Required)
      * A tuple of integers specifying the end index into the shape vector of the corresponding ``ref_tensor``.
  
  end_masks: Tuple[const<bool>] (Required)
      * If ``True``, select all axes from the begin index until the end of the corresponding ``ref_tensor``, as in
        ``ref_tensors[i].shape[begins[i]:]``.
  
  Notes
  -----
  The output shape is computed as follows:
  
  .. sourcecode:: python
  
      output_shape = []
      num_of_refs = len(begins)
      for i in range(num_of_refs):
          if end_masks[i]:
              output_shape.append(ref_tensor_i.shape[begins[i]:])
          else:
              output_shape.append(ref_tensor_i.shape[begins[i]:ends[i]])
      output_shape = np.concat(output_shape, axis=0)
  
  The following is an example:
  
  .. sourcecode:: python
  
      ref_tensors=[tensor[2, 3, 4], tensor[1, 5, 6]]
      begins=[0, 1]
      ends=[2, 0]
      end_masks=[False, True]
  
  The output shape would be ``(2, 3, 5, 6)``.
  
  Returns
  -------
  tensor<\*?, T>
      * Same type as input tensor ``x``.
      * Output shape is computed by ``ref_tensors``, ``begins``, ``ends``, and ``end_masks``.
  
  Attributes
  ----------
  T: fp16, fp32, i32, bool
  R: fp16, fp32, i32, bool
docstr: This utility function checks the param is a Tuple of scalar with expected data type.
docstr_tok: ["This","utility","function","checks","the","param","is","a","Tuple","of","scalar","with","expected","data","type","."]
code: def _check_is_const_tuple_with_scalar(
      self, param, expected_type, param_name
  ):
      """
      This utility function checks the param is a Tuple of scalar with expected data type.
      """
      for x in param:
          if x.dtype != expected_type or x.shape != ():
              msg = "In op reshape_like {}, {} must be a Tuple of scalar {}. Got a {} tensor with shape {}.".format(
                  self.name,
                  param_name,
                  expected_type.__type_info__(),
                  x.dtype.__type_info__(),
                  x.shape,
              )
              raise ValueError(msg)
  
file_path: coremltools/coremltools/converters/mil/mil/ops/defs/iOS16/tensor_transformation.py
imports: import numpy
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.input_type import InputSpec, TensorInputType, TupleInputType
  from coremltools.converters.mil.mil.operation import Operation
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.ops.defs.iOS16 import _IOS16_TARGET
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic
label_desc: Use image node_id 1 for calling the reshape_like obj's underlying member method code with example usage: obj._check_is_const_tuple_with_scalar(param, expected_type, param_name) without return types