code: def check_unary(self, name, xp, dtype, no_complex=False):
      if no_complex:
          if numpy.dtype(dtype).kind == "c":
              return xp.array(True)
      a = testing.shaped_arange((2, 3), xp, dtype)
      return getattr(xp, name)(a)
  
file_path: cupy/tests/cupy_tests/math_tests/test_explog.py
imports: import numpy
  import pytest
  from cupy import testing
label_desc: Use image node_id 1 for calling the TestExplog obj's underlying member method code with example usage: obj.check_unary(name, xp, dtype, no_complex) and returns: getattr, xp