code: def testSum(self):
      for input_size, in_place in self.test_configs:
          op = core.CreateOperator(
              "Sum", ["X1", "X2"], ["Y" if not in_place else "X1"]
          )
          X1 = np.random.rand(*input_size).astype(np.float32) - 0.5
          X2 = np.random.rand(*input_size).astype(np.float32) - 0.5
          res = device_checker.CheckSimple(op, [X1, X2], [0])
          self.assertTrue(res)
          for checker in gradient_checkers:
              res, grad, grad_estimated = checker.CheckSimple(
                  op, [X1, X2], 0, [0]
              )
              self.assertTrue(res)
              res, grad, grad_estimated = checker.CheckSimple(
                  op, [X1, X2], 1, [0]
              )
              self.assertTrue(res)
  
imports: import numpy
  from caffe2.python import brew, core, device_checker, gradient_checker, model_helper, test_util, workspace
  from caffe2.python.gradient_checker import NetGradientChecker
  from caffe2.python.net_builder import ops, NetBuilder
  from caffe2.proto import caffe2_pb2
  import unittest
  from typing import Optional
label_desc: Use image node_id 2 for calling the TestSum obj's underlying member method code with example usage: obj.testSum() without return types