def check_region(data, x, y, match):
    """Compares a region to the given """
    w = len(match[0])
    for cy in range(len(match)):
        if match[cy] != data[y + cy][x:x + w]:
            return False
    return True
