code: def test_reshape_ops(self):
      device_opt = core.DeviceOption(caffe2_pb2.IDEEP, 0)
      with core.DeviceScope(device_opt):
          workspace.FeedBlob(
              "res", np.array([[0, 0, 0, 0]], dtype=np.float32)
          )
          workspace.FeedBlob(
              "shape",
              np.array([1, 4], dtype=np.int32),
              core.DeviceOption(caffe2_pb2.CPU, 0),
          )
          workspace.FeedBlob(
              "input", np.zeros((2, 2), dtype=np.float32)
          )
          workspace.RunOperatorOnce(
              core.CreateOperator(
                  "Reshape", ["input", "shape"], ["output", "old_shape"]
              )
          )
          assert (
              workspace.FetchBlob("output")
              == workspace.FetchBlob("res")
          ).all()
  
file_path: pytorch/caffe2/python/ideep/reshape_op_test.py
imports: from caffe2.python.test_util import TestCase
  from caffe2.proto import caffe2_pb2
  import unittest
  import numpy
  from caffe2.python import core, workspace
label_desc: Use image node_id 1 for calling the TestReShapeOps obj's underlying member method code with example usage: obj.test_reshape_ops() without return types