code: def check_unary_inf(self, name, xp, dtype):
      a = xp.array(
          [-3, numpy.inf, -1, -numpy.inf, 0, 1, 2], dtype=dtype
      )
      return getattr(xp, name)(a)
  
file_path: cupy/tests/cupy_tests/logic_tests/test_content.py
imports: import unittest
  import numpy
  from cupy import testing
label_desc: Use image node_id 1 for calling the TestContent obj's underlying member method code with example usage: obj.check_unary_inf(name, xp, dtype) and returns: getattr