code: def test_on_real_input(self):
      x = dvector()
      rng = np.random.default_rng(23)
      xval = rng.standard_normal(10)
      np.all(0 == pytensor.function([x], imag(x))(xval))
      np.all(xval == pytensor.function([x], real(x))(xval))
  
      x = imatrix()
      xval = np.asarray(
          rng.standard_normal((3, 3)) * 100, dtype="int32"
      )
      np.all(0 == pytensor.function([x], imag(x))(xval))
      np.all(xval == pytensor.function([x], real(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 2 for calling the TestRealImag obj's underlying member method code with example usage: obj.test_on_real_input() without return types