code: def check_unary(self, name, xp):
      a = xp.array([-3, xp.inf, -1, -xp.inf, 0, 1, 2, xp.nan])
      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 TestUfuncLike obj's underlying member method code with example usage: obj.check_unary(name, xp) and returns: getattr