code: def run_reduce_op_test_impl(
      self,
      op_name,
      X,
      axes,
      keepdims,
      ref_func,
      gc,
      dc,
      allow_broadcast_fastpath,
  ):
      extra_args = (
          dict(allow_broadcast_fastpath=True)
          if allow_broadcast_fastpath
          else {}
      )
      if axes is None:
          op = core.CreateOperator(
              op_name,
              ["X"],
              ["Y"],
              keepdims=keepdims,
              **extra_args,
          )
      else:
          op = core.CreateOperator(
              op_name,
              ["X"],
              ["Y"],
              axes=axes,
              keepdims=keepdims,
              **extra_args,
          )
  
      def ref(X):
          return [
              ref_func(
                  X,
                  axis=None if axes is None else tuple(axes),
                  keepdims=keepdims,
              )
          ]
  
      with self.set_disable_serialized_check(allow_broadcast_fastpath):
          self.assertReferenceChecks(gc, op, [X], ref)
      self.assertDeviceChecks(dc, op, [X], [0])
      self.assertGradientChecks(gc, op, [X], 0, [0])
  
imports: from caffe2.python import core, workspace
  from hypothesis import given, settings
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  import hypothesis.strategies
  import numpy
  import itertools
label_desc: Use image node_id 1 for calling the TestReduceOps obj's underlying member method code with example usage: obj.run_reduce_op_test_impl(op_name, X, axes, keepdims, ref_func, gc, dc, allow_broadcast_fastpath) and returns: list