def is_condition_two(idx):
    """
    a = paddle.to_tensor(np.random.rand(1, 2, 3).astype("float32"))
    a[..., :2]
    """
    if idx[0] is Ellipsis and (isinstance(idx[1], slice) or isinstance(idx[1],
                                                                       int)):
        return True
    return False