code: def test_set_get_imag_execution(setup):
      a_data = np.array([1 + 2j, 3 + 4j, 5 + 6j])
      a = tensor(a_data, chunk_size=2)
  
      res = a.imag.execute().fetch()
      expected = a_data.imag
  
      np.testing.assert_equal(res, expected)
  
      a.imag = 9
  
      res = a.execute().fetch()
      expected = a_data.copy()
      expected.imag = 9
  
      np.testing.assert_equal(res, expected)
  
      a.imag = np.array([9, 8, 7])
  
      res = a.execute().fetch()
      expected = a_data.copy()
      expected.imag = np.array([9, 8, 7])
  
      np.testing.assert_equal(res, expected)
  
      # test sparse
      a_data = np.array([[1 + 2j, 3 + 4j, 0], [0, 0, 0]])
      a = tensor(sps.csr_matrix(a_data))
  
      res = a.imag.execute().fetch().toarray()
      expected = a_data.imag
  
      np.testing.assert_equal(res, expected)
  
      a.imag = 9
  
      res = a.execute().fetch().toarray()
      expected = a_data.copy()
      expected.imag = 9
  
      np.testing.assert_equal(res, expected)
  
      a.imag = np.array([9, 8, 7])
  
      res = a.execute().fetch().toarray()
      expected = a_data.copy()
      expected.imag = np.array([9, 8, 7])
  
      np.testing.assert_equal(res, expected)
  
imports: import functools
  import operator
  import numpy
  import scipy.sparse
  import pytest
  from ....config import option_context
  from ....session import execute, fetch
  from ....tests.core import require_cupy
  from ....utils import ignore_warning
  from ...datasource import ones, tensor, zeros, arange
  from ..None import add, cos, truediv, frexp, modf, clip, isclose, arctan2, tree_add, tree_multiply
label_desc: Use image node_id 23 for calling a global function with example usage: test_set_get_imag_execution(setup) without return types