code: def test_imag_complex(self, xp, dtype):
      x = testing.shaped_arange(self.shape, xp, dtype=dtype)
      x_ = x.copy()
      imag = xp.imag(x_)
      # imag returns a view
      assert imag.base is x_
      x_ += 1 + 1j
      testing.assert_array_equal(imag, x.imag + 1)
      return imag
  
imports: import itertools
  import warnings
  import numpy
  import pytest
  import cupy
  from cupy import testing
label_desc: Use image node_id 8 for calling the TestComplex obj's underlying member method code with example usage: obj.test_imag_complex(xp, dtype) and returns: imag