input: Write a function to perform matrix multiplication on two given matrices. If the matrices are not compatible for multiplication, return None. The function should return the resulting matrix after multiplication.
  
  def matrix_multiplication(A, B):  
      rows_A, cols_A = len(A), len(A[0])  
      rows_B, cols_B = len(B), len(B[0])  
      if cols_A != rows_B:  
          return None  
      result = [[0 for _ in range(cols_B)] for _ in range(rows_A)]  
      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
  
  assert matrix_multiplication([[1, 2], [3, 4]], [[5, 6], [7, 8]]) == [[19, 22], [43, 50]]
  assert matrix_multiplication([[1, 2, 3], [4, 5, 6]], [[7, 8], [9, 10], [11, 12]]) == [[58, 64], [139, 154]]
  assert matrix_multiplication([[1, 2], [3, 4]], [[5, 6, 7], [8, 9, 10]]) == None
  assert matrix_multiplication([], []) == None
output: def matrix_multiplication(A, B):  
      rows_A, cols_A = len(A), len(A[0]) if A else 0  
      rows_B, cols_B = len(B), len(B[0]) if B else 0  
      if cols_A != rows_B:  
          return None  
      result = [[0 for _ in range(cols_B)] for _ in range(rows_A)]  
      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