def __check_input(x, UPLO):
    x_shape = list(x.shape)
    if (len(x.shape) < 2):
        raise ValueError(('Input(input) only support >=2 tensor, but received length of Input(input) is %s.' % len(x.shape)))
    if (x_shape[(- 1)] != x_shape[(- 2)]):
        raise ValueError("The input matrix must be batches of square matrices. But received x's dimention: {}".format(x_shape))
    if ((UPLO != 'L') and (UPLO != 'U')):
        raise ValueError('UPLO must be L or U. But received UPLO is: {}'.format(UPLO))
def __check_input(x, UPLO):
    x_shape = list(x.shape)
    if (len(x.shape) < 2):
        raise ValueError(('Input(input) only support >=2 tensor, but received length of Input(input) is %s.' % len(x.shape)))
    if (x_shape[(- 1)] != x_shape[(- 2)]):
        raise ValueError("The input matrix must be batches of square matrices. But received x's dimention: {}".format(x_shape))
    if ((UPLO != 'L') and (UPLO != 'U')):
        raise ValueError('UPLO must be L or U. But received UPLO is: {}'.format(UPLO))