code: def test_elementwise_sqrsum(self, n, dtype, gc, dc):
      if dtype == np.float16:
          # fp16 is only supported with CUDA/HIP
          assume(gc.device_type == workspace.GpuDeviceType)
          dc = [
              d for d in dc if d.device_type == workspace.GpuDeviceType
          ]
  
      X = np.random.rand(n).astype(dtype)
  
      def sumsqr_op(X):
          return [np.sum(X * X)]
  
      op = core.CreateOperator("SumSqrElements", ["X"], ["y"])
  
      threshold = 0.01 if dtype == np.float16 else 0.005
  
      self.assertReferenceChecks(
          device_option=gc,
          op=op,
          inputs=[X],
          reference=sumsqr_op,
          threshold=threshold,
      )
  
file_path: pytorch/caffe2/python/operator_test/reduction_ops_test.py
imports: from caffe2.python import core, workspace
  from hypothesis import assume, given, settings
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  import hypothesis.strategies
  import numpy
label_desc: Use image node_id 3 for calling the TestReductionOps obj's underlying member method code with example usage: obj.test_elementwise_sqrsum(n, dtype, gc, dc) and returns: list