def METHOD_NAME():
    """Test for tensor-train"""
    rng = tl.check_random_state(1234)
    ## Test 2
    # Create tensor with random elements
    tensor = tl.tensor(rng.random_sample([3, 4, 5, 6, 2, 10]))
    # Find TT decomposition of the tensor
    rank = [1, 2, 2, 3, 2, 2, 1]
    factors = tensor_train_cross(tensor, rank, random_state=rng)
    for k in range(6):
        (r_prev, n_k, r_k) = factors[k].shape
        first_error_message = (
            "TT rank " + str(k) + " is greater than the maximum allowed "
        )
        first_error_message += str(r_prev) + " > " + str(rank[k])
        assert r_prev <= rank[k], first_error_message
        first_error_message = (
            "TT rank " + str(k + 1) + " is greater than the maximum allowed "
        )
        first_error_message += str(r_k) + " > " + str(rank[k + 1])
        assert r_k <= rank[k + 1], first_error_message