code: def test_jax_Subtensor_constant():
      # Basic indices
      x_pt = pt.as_tensor(np.arange(3 * 4 * 5).reshape((3, 4, 5)))
      out_pt = x_pt[1, 2, 0]
      assert isinstance(out_pt.owner.op, pt_subtensor.Subtensor)
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      out_pt = x_pt[1:, 1, :]
      assert isinstance(out_pt.owner.op, pt_subtensor.Subtensor)
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      out_pt = x_pt[:2, 1, :]
      assert isinstance(out_pt.owner.op, pt_subtensor.Subtensor)
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      out_pt = x_pt[1:2, 1, :]
      assert isinstance(out_pt.owner.op, pt_subtensor.Subtensor)
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      # Advanced indexing
      out_pt = pt_subtensor.advanced_subtensor1(x_pt, [1, 2])
      assert isinstance(
          out_pt.owner.op, pt_subtensor.AdvancedSubtensor1
      )
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      out_pt = x_pt[[1, 2], [2, 3]]
      assert isinstance(out_pt.owner.op, pt_subtensor.AdvancedSubtensor)
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      # Advanced and basic indexing
      out_pt = x_pt[[1, 2], :]
      assert isinstance(out_pt.owner.op, pt_subtensor.AdvancedSubtensor)
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      out_pt = x_pt[[1, 2], :, [3, 4]]
      assert isinstance(out_pt.owner.op, pt_subtensor.AdvancedSubtensor)
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
      # Flipping
      out_pt = x_pt[::-1]
      out_fg = FunctionGraph([], [out_pt])
      compare_jax_and_py(out_fg, [])
  
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 1 for calling a global function with example usage: test_jax_Subtensor_constant() without return types