input: Write a python function to multiply two matrices.
  assert matrix_multiply([[2, 4, -3], [6, 1, 0]], [[1, -1], [2, 0], [3, 4]]) == [[4, -4], [24, 12]]
  assert matrix_multiply([[1, 2], [3, 4]], [[2, 0], [1, 3]]) == [[4, 6], [10, 12]]
  assert matrix_multiply([[1, 2, 3], [4, 5, 6]], [[7, 8], [9, 10], [11, 12]]) == [[58, 64], [139, 154]]
output: def matrix_multiply(A, B):
      rows_A = len(A)
      cols_A = len(A[0])
      rows_B = len(B)
      cols_B = len(B[0])
      
      # Check if multiplication is possible
      if cols_A != rows_B:
          raise ValueError("Number of columns in A must be equal to number of rows in B")
      
      # Initialize the result matrix with zeros
      result = [[0 for _ in range(cols_B)] for _ in range(rows_A)]
      
      # Perform matrix multiplication
      for i in range(rows_A):
          for j in range(cols_B):
              for k in range(cols_A):
                  result[i][j] += A[i][k] * B[k][j]
                  
      return result