code: def _rank_promoted_to_same_as_data(data, axis, param):
      """
      Reshapes `param` to be the same shape as `data`.
      """
      if axis is not None:
          axis = axis if axis >= 0 else axis + len(data.shape)
      if len(param.shape) == 0:
          return np.reshape(param, np.ones(len(data.shape), np.int32))
      else:
          axes = [i for i in range(len(data.shape)) if i != axis]
          return np.expand_dims(param, axis=tuple(axes))
  
file_path: coremltools/coremltools/converters/mil/mil/ops/defs/iOS17/quantization_ops.py
imports: import numpy
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.input_type import InputSpec, TensorInputType
  from coremltools.converters.mil.mil.operation import VALUE, Operation, precondition
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.ops.defs.iOS17 import _IOS17_TARGET
label_desc: Use image node_id 1 for calling a global function with example usage: _rank_promoted_to_same_as_data(data, axis, param) and returns: np, np