def METHOD_NAME(result, input, tile, ratio, angle):
    result = np.uint8(result)
    input = np.uint8(input)
    w = result.shape[1]
    h = result.shape[0]
    eps = 0.1
    # inside of squares should be black
    mask = np.uint8(1 - get_mask(w, h, tile, ratio, angle, -eps))
    result2 = cv2.bitwise_and(result, result, mask=mask)
    assert not np.any(result2)
    # outside of squares should be same as input
    mask = np.uint8(get_mask(w, h, tile, ratio, angle, eps))
    result2 = cv2.bitwise_and(result, result, mask=mask)
    input2 = cv2.bitwise_and(input, input, mask=mask)
    assert np.all(result2 == input2)