def METHOD_NAME(mat_shape, optimize, **kwargs):
    """``AB + AC = D``."""
    i, j, k = dimensions('i j k')
    A = Function(name='A', shape=mat_shape, dimensions=(i, j))
    B = Function(name='B', shape=mat_shape, dimensions=(j, k))
    C = Function(name='C', shape=mat_shape, dimensions=(j, k))
    D = Function(name='D', shape=mat_shape, dimensions=(i, k))
    mat_mat_sum(A, B, C, D, optimize)