    
    Returns
    -------
    Area of box determined by these two anchors
    """
    m = a2[0]-a1[0]+1
    n = a2[1]-a1[1]+1
    return m*n

def mrmsdtw(X, Y, tau, debug=False, refine=True):
    """
    An implementation of the approximate, memory-restricted