code: def test_shared_variable():
      """Test that user defined shared variables (other than RNGs) aren't copied."""
      x = shared(np.array([1, 2, 3.0]), name="x")
      y = shared(np.array([1, 2, 3.0]), name="y")
  
      with pm.Model() as m_old:
          test = pm.Normal("test", mu=x, observed=y)
  
      assert test.owner.inputs[3] is x
      assert m_old.rvs_to_values[test] is y
  
      m_new = clone_model(m_old)
      test_new = m_new["test"]
      # Shared Variables are cloned but still point to the same memory
      assert test_new.owner.inputs[3] is not x
      assert m_new.rvs_to_values[test_new] is not y
      assert same_storage(test_new.owner.inputs[3], x)
      assert same_storage(m_new.rvs_to_values[test_new], y)
  
file_path: pymc/tests/model/test_fgraph.py
imports: import numpy
  import pytensor.tensor
  import pytest
  from pytensor import config, shared
  from pytensor.graph import Constant, FunctionGraph, node_rewriter
  from pytensor.graph.rewriting.basic import in2out
  from pytensor.tensor.exceptions import NotScalarConstantError
  import pymc
  from pymc.model.fgraph import ModelDeterministic, ModelFreeRV, ModelNamed, ModelObservedRV, ModelPotential, ModelVar, clone_model, fgraph_from_model, model_deterministic, model_free_rv, model_from_fgraph
label_desc: Use image node_id 4 for calling a global function with example usage: test_shared_variable() without return types