def METHOD_NAME(x: Expr, k: int = 0) -> Expr:
    """Return the upper triangular part of a matrix or a batch of matrices.
    Parameters
    ----------
    x : relax.Expr
        The tensor that triu will be applied to.
        It is required to have at least two dimensions.
    k : int
        The index indicating the diagonal below which to zero elements.
        If k = 0, the diagonal is the main diagonal.
        If k < 0, the diagonal is below the main diagonal.
        If k > 0, the diagonal is above the main diagonal.
    Returns
    -------
    ret : relax.Expr
        The result tensor.
    """
    return _ffi_api.METHOD_NAME(x, k)  # type: ignore