def METHOD_NAME():
    """test for random.random_tucker"""
    shape = (10, 11, 12)
    rank = 4
    tensor = random_tucker(shape, rank, full=True)
    for i in range(T.ndim(tensor)):
        assert_equal(matrix_rank(T.to_numpy(unfold(tensor, i))), rank)
    core, factors = random_tucker(shape, rank, full=False)
    for i, factor in enumerate(factors):
        assert_equal(
            factor.shape,
            (shape[i], rank),
            err_msg=f"{i}-th factor has shape {factor.shape}, expected {(shape[i], rank)}",
        )
    shape = (10, 11, 12)
    rank = (6, 4, 5)
    tensor = random_tucker(shape, rank, full=True)
    for i in range(T.ndim(tensor)):
        assert_equal(matrix_rank(T.to_numpy(unfold(tensor, i))), min(shape[i], rank[i]))
    core, factors = random_tucker(shape, rank, orthogonal=True, full=False)
    for i, factor in enumerate(factors):
        assert_equal(
            factor.shape,
            (shape[i], rank[i]),
            err_msg=f"{i}-th factor has shape {factor.shape}, expected {(shape[i], rank[i])}.",
        )
    assert_equal(
        core.shape, rank, err_msg=f"core has shape {core.shape}, expected {rank}."
    )
    for factor in factors:
        assert_array_almost_equal(
            T.dot(T.transpose(factor), factor), T.tensor(np.eye(factor.shape[1]))
        )
    tensor = tucker_to_tensor((core, factors))
    reconstructed = multi_mode_dot(tensor, factors, transpose=True)
    assert_array_almost_equal(core, reconstructed)