<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def matrix_chain_mult(M):
 """Matrix chain multiplication :param M: list of matrices :complexity: whatever is needed by the multiplications """

    opt, arg = matrix_mult_opt_order(M)
    return _apply_order(M, arg, 0, len(M)-1)