code: def test_complex(self):
      rng = np.random.default_rng(2333)
      m = fmatrix()
      c = pt_complex(m[0], m[1])
      assert c.type == cvector
      r, i = [real(c), imag(c)]
      assert r.type == fvector
      assert i.type == fvector
      f = pytensor.function([m], [r, i])
  
      mval = np.asarray(rng.standard_normal((2, 5)), dtype="float32")
      rval, ival = f(mval)
      assert np.all(rval == mval[0]), (rval, mval[0])
      assert np.all(ival == mval[1]), (ival, mval[1])
  
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 4 for calling the TestRealImag obj's underlying member method code with example usage: obj.test_complex() without return types