Implement Matrix Multiplication
Asked in the Onsite stage. Coding round question similar to standard LeetCode matrix multiplication problems (LeetCode 311).
Implement multiply_matrices(A, B). A and B are non-empty rectangular matrices represented as lists of integer lists. Return their product as a new matrix. Matrix multiplication is valid when the number of columns in A equals the number of rows in B. If the dimensions are incompatible, return [].
def multiply_matrices(A, B):