code: def mat_slice_of_slice(parent, rowslice, colslice):
      """Collapse nested matrix slices
  
      >>> from sympy import MatrixSymbol
      >>> X = MatrixSymbol('X', 10, 10)
      >>> X[:, 1:5][5:8, :]
      X[5:8, 1:5]
      >>> X[1:9:2, 2:6][1:3, 2]
      X[3:7:2, 4:5]
      """
      row = slice_of_slice(parent.rowslice, rowslice)
      col = slice_of_slice(parent.colslice, colslice)
      return MatrixSlice(parent.parent, row, col)
  
file_path: sympy/sympy/matrices/expressions/slice.py
imports: from sympy.matrices.expressions.matexpr import MatrixExpr
  from sympy.core.basic import Basic
  from sympy.core.containers import Tuple
  from sympy.functions.elementary.integers import floor
label_desc: Use image node_id 3 for calling a global function with example usage: mat_slice_of_slice(parent, rowslice, colslice) and returns: MatrixSlice