def place_equiv(y, y_hat):
    """
    Checks if two cvs have equivalent place.
    """
    if ((y%19 in [0, 2, 10, 1, 11, 6, 3, 17]) and
        (y_hat%19 in [0, 2, 10, 1, 11, 6, 3, 17])):
        if (y%19 in [0, 2, 10]) and (y_hat%19 in [0, 2, 10]):
            # b, f, r
            return True
        elif (y%19 in [1, 11, 6]) and (y_hat%19 in [1, 11, 6]):
            # d, s, l
            return True
        elif (y%19 in [3, 17]) and (y_hat%19 in [3, 17]):
            # g, y
            return True
        else:
            return False
    else:
        return None