code: def test_basic(self):
      x = zvector()
      rng = np.random.default_rng(23)
      xval = np.asarray(
          [
              complex(rng.standard_normal(), rng.standard_normal())
              for i in range(10)
          ]
      )
      assert np.all(xval.real == pytensor.function([x], real(x))(xval))
      assert np.all(xval.imag == pytensor.function([x], imag(x))(xval))
  
imports: import numpy
  import pytest
  import pytensor
  from pytensor.gradient import GradientError
  from pytensor.tensor.basic import cast
  from pytensor.tensor.math import complex
  from pytensor.tensor.math import complex_from_polar, imag, real
  from pytensor.tensor.type import cvector, dvector, fmatrix, fvector, imatrix, zvector
  from tests import unittest_tools
label_desc: Use image node_id 1 for calling the TestRealImag obj's underlying member method code with example usage: obj.test_basic() without return types