code: def test_elementwise_power(self, X, exponent, gc, dc):
      # negative integer raised with non-integer exponent is domain error
      X = np.abs(X)
  
      def powf(X):
          return (X**exponent,)
  
      def powf_grad(g_out, outputs, fwd_inputs):
          return (exponent * (fwd_inputs[0] ** (exponent - 1)) * g_out,)
  
      op = core.CreateOperator("Pow", ["X"], ["Y"], exponent=exponent)
  
      self.assertReferenceChecks(
          gc,
          op,
          [X],
          powf,
          output_to_grad="Y",
          grad_reference=powf_grad,
          ensure_outputs_are_inferred=True,
      )
  
file_path: pytorch/caffe2/python/operator_test/math_ops_test.py
imports: from caffe2.python import core
  from hypothesis import given, settings
  from hypothesis import strategies
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  import numpy
  import unittest
label_desc: Use image node_id 1 for calling the TestMathOps obj's underlying member method code with example usage: obj.test_elementwise_power(X, exponent, gc, dc) and returns: unknown, unknown