code: def test_pickle(self):
      rng_r = random_state_type()
  
      rng_pkl = pickle.dumps(rng_r)
      rng_unpkl = pickle.loads(rng_pkl)
  
      assert rng_r != rng_unpkl
      assert rng_r.type == rng_unpkl.type
      assert hash(rng_r.type) == hash(rng_unpkl.type)
  
file_path: pytensor/tests/tensor/random/test_type.py
imports: import pickle
  import numpy
  import pytest
  from pytensor import shared
  from pytensor.compile.ops import ViewOp
  from pytensor.tensor.random.type import RandomGeneratorType, RandomStateType, random_generator_type, random_state_type
label_desc: Use image node_id 1 for calling the TestRandomStateType obj's underlying member method code with example usage: obj.test_pickle() without return types