code: def set_pytensor_flags():
      rewrites_query = RewriteDatabaseQuery(include=[None], exclude=[])
      py_mode = Mode("py", rewrites_query)
      with config.change_flags(mode=py_mode, compute_test_value="warn"):
          yield
  
file_path: pytensor/tests/tensor/random/test_utils.py
imports: import numpy
  import pytest
  from pytensor import config, function
  from pytensor.compile.mode import Mode
  from pytensor.graph.rewriting.db import RewriteDatabaseQuery
  from pytensor.tensor.random.utils import RandomStream, broadcast_params, supp_shape_from_ref_param_shape
  from pytensor.tensor.type import matrix, tensor
  from tests import unittest_tools
label_desc: Use image node_id 1 for calling a global function with example usage: set_pytensor_flags() without return types