code: def test_on_diag():
      assert not MatrixSlice(X, (a, b), (c, d)).on_diag
      assert MatrixSlice(X, (a, b), (a, b)).on_diag
  
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 3 for calling a global function with example usage: test_on_diag() without return types