input: def Matrix_Operations(matrix_instance):
      """This function performs various matrix operations on a given matrix object. 
      The operations include addition, subtraction, multiplication and transpose.
      The function takes a matrix object that should have methods for each of these operations.
      The function will return the resulting matrix after performing the operations.
      >>> matrix1 = Matrix(2, 2, [1, 2, 3, 4])
      >>> matrix2 = Matrix(2, 2, [5, 6, 7, 8])
      >>> matrix1.add(matrix2)
      >>> str(matrix1)
      '6 8 \n10 12 \n'
      >>> matrix3 = Matrix(2, 2, [1, 2, 3, 4])
      >>> matrix4 = Matrix(2, 2, [5, 6, 7, 8])
      >>> matrix3.sub(matrix4)
      >>> str(matrix3)
      '-4 -4 \n-4 -4 \n'
      >>> matrix5 = Matrix(2, 2, [1, 2, 3, 4])
      >>> matrix6 = Matrix(2, 2, [5, 6, 7, 8])
      >>> matrix5.mul(matrix6)
      >>> str(matrix5)
      '19 22 \n43 50 \n'
      >>> matrix7 = Matrix(2, 2, [1, 2, 3, 4])
      >>> matrix7.transpose()
      >>> str(matrix7)
      '1 3 \n2 4 \n'
      """
output:     result_matrix = matrix_instance.add(matrix_instance)
      result_matrix = result_matrix.sub(matrix_instance)
      result_matrix = result_matrix.mul(matrix_instance)
      result_matrix = result_matrix.transpose()
      return result_matrix