code: def test_view_op_c_code():
      # TODO: It might be good to make sure that the registered C code works
      # (even though it's basically copy-paste from other registered `Op`s).
      # from pytensor.compile.ops import view_op
      # from pytensor.link.c.basic import CLinker
      # rng_var = random_state_type()
      # rng_view = view_op(rng_var)
      # function(
      #     [rng_var],
      #     rng_view,
      #     mode=Mode(optimizer=None, linker=CLinker()),
      # )
      assert ViewOp.c_code_and_version[RandomStateType]
      assert ViewOp.c_code_and_version[RandomGeneratorType]
  
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 a global function with example usage: test_view_op_c_code() without return types