code: def reshape_reference_implementation(
      data: np.ndarray, shape: np.ndarray, allowzero: int = 0
  ) -> np.ndarray:
      # replace zeros with corresponding dim size
      # we need to do this because np.reshape doesn't support 0 by default unless 'allowzero' is set
      new_shape = np.copy(shape)
      if allowzero == 0:
          zeros_index = np.where(shape == 0)
          new_shape[zeros_index] = np.array(data.shape)[zeros_index]
      reshaped = np.reshape(data, new_shape)
      return reshaped
  
file_path: onnx/onnx/backend/test/case/node/reshape.py
imports: import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
label_desc: Use image node_id 1 for calling a global function with example usage: reshape_reference_implementation(data, shape, allowzero) and returns: reshaped