code: def test_shared_updates():
      a = shared(0)
  
      pytensor_jax_fn = function([], a, updates={a: a + 1}, mode="JAX")
      res1, res2 = pytensor_jax_fn(), pytensor_jax_fn()
      assert res1 == 0
      assert res2 == 1
      assert a.get_value() == 2
  
      a.set_value(5)
      res1, res2 = pytensor_jax_fn(), pytensor_jax_fn()
      assert res1 == 5
      assert res2 == 6
      assert a.get_value() == 7
  
imports: from collections.abc import Iterable
  from functools import partial
  from typing import Callable, Optional
  import numpy
  import pytest
  from pytensor.compile.function import function
  from pytensor.compile.mode import get_mode
  from pytensor.compile.sharedvalue import SharedVariable, shared
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import Op, get_test_value
  from pytensor.ifelse import ifelse
  from pytensor.raise_op import assert_op
  from pytensor.tensor.type import dscalar, scalar, vector
label_desc: Use image node_id 5 for calling a global function with example usage: test_shared_updates() without return types