code: def test_jax_Subtensor_dynamic():
      a = pt.iscalar("a")
      x = pt.arange(3)
      out_pt = x[:a]
      assert isinstance(out_pt.owner.op, pt_subtensor.Subtensor)
      out_fg = FunctionGraph([a], [out_pt])
      compare_jax_and_py(out_fg, [1])
  
file_path: pytensor/tests/link/jax/test_subtensor.py
imports: import numpy
  import pytest
  import pytensor.tensor
  from pytensor.configdefaults import config
  from pytensor.graph.fg import FunctionGraph
  from pytensor.tensor import subtensor
  from pytensor.tensor.rewriting.jax import boolean_indexing_set_or_inc, boolean_indexing_sum
  from tests.link.jax.test_basic import compare_jax_and_py
label_desc: Use image node_id 2 for calling a global function with example usage: test_jax_Subtensor_dynamic() without return types