code: def test_exceptions():
      X = MatrixSymbol("x", 10, 20)
      raises(IndexError, lambda: X[0:12, 2])
      raises(IndexError, lambda: X[0:9, 22])
      raises(IndexError, lambda: X[-1:5, 2])
  
file_path: sympy/sympy/matrices/expressions/tests/test_slice.py
imports: from sympy.matrices.expressions.slice import MatrixSlice
  from sympy.matrices.expressions import MatrixSymbol
  from sympy.abc import a, b, c, d, k, l, m, n
  from sympy.testing.pytest import raises, XFAIL
  from sympy.functions.elementary.integers import floor
  from sympy.assumptions import assuming, Q
label_desc: Use image node_id 6 for calling a global function with example usage: test_exceptions() without return types