code: def _compareGpu(self, x, np_func, tf_func):
      np_ans = np_func(x)
      with test_util.use_gpu():
          result = tf_func(ops.convert_to_tensor(x))
          tf_gpu = self.evaluate(result)
          # Slightly increase the tolerance for float64 computations. This is
          # desired for specifically lgamma but shouldn't be of concern for other
          # functions.
          self.assertAllCloseAccordingToType(np_ans, tf_gpu, atol=2e-6)
  
imports: import math
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_grad
  from tensorflow.python.ops import special_math_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 4 for calling the UnaryOpTest obj's underlying member method code with example usage: obj._compareGpu(x, np_func, tf_func) without return types