code: def test_runtime_errors(self):
      a = matrix("a")
  
      a_splits = ptb.split(a, splits_size=[2, 2, 2], n_splits=2, axis=0)
      fn = pytensor.function([a], a_splits, mode="JAX")
      with pytest.raises(
          ValueError, match="Length of splits is not equal to n_splits"
      ):
          fn(np.zeros((6, 4), dtype=pytensor.config.floatX))
  
      a_splits = ptb.split(a, splits_size=[2, 4], n_splits=3, axis=0)
      fn = pytensor.function([a], a_splits, mode="JAX")
      with pytest.raises(
          ValueError, match="Length of splits is not equal to n_splits"
      ):
          fn(np.zeros((6, 4), dtype=pytensor.config.floatX))
  
      a_splits = ptb.split(a, splits_size=[2, 4], n_splits=2, axis=0)
      fn = pytensor.function([a], a_splits, mode="JAX")
      with pytest.raises(
          ValueError,
          match="Split sizes do not sum up to input length along axis: 7",
      ):
          fn(np.zeros((7, 4), dtype=pytensor.config.floatX))
  
      a_splits = ptb.split(
          a, splits_size=[2, -4, 8], n_splits=3, axis=0
      )
      fn = pytensor.function([a], a_splits, mode="JAX")
      with pytest.raises(
          ValueError,
          match="Split sizes cannot be negative",
      ):
          fn(np.zeros((6, 4), dtype=pytensor.config.floatX))
  
imports: import numpy
  import pytest
  from pytensor.compile import get_mode
  import jax.errors
  import pytensor
  import pytensor.tensor.basic
  from pytensor.configdefaults import config
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import get_test_value
  from pytensor.tensor.type import iscalar, matrix, scalar, vector
  from tests.link.jax.test_basic import compare_jax_and_py
  from tests.tensor.test_basic import TestAlloc
label_desc: Use image node_id 2 for calling the TestJaxSplit obj's underlying member method code with example usage: obj.test_runtime_errors() without return types