def METHOD_NAME(
    x: Expr,
    sorted: Union[bool, Expr] = True,
    return_index: Union[bool, Expr] = False,
    return_inverse: Union[bool, Expr] = False,
    return_counts: Union[bool, Expr] = False,
    axis: Optional[Union[int, Expr]] = None,
) -> Expr:
    """Find the unique elements in a given tensor.
    In addition, it optionally returns
    - the indices of the input tensor that give the unique values;
    - the indices of the unique tensor that reconstruct the input tensor;
    - the number of times each unique value comes up in the input tensor.
    Parameters
    ----------
    x : relax.Expr
        The input tensor.
    sorted : Union[bool, Expr]
        Whether to sort the unique elements in ascending order before
        returning as output.
    return_index : Union[bool, Expr]
        Whether to return an additional tensor with indices for where elements in
        the unique tensor come from the original input.
    return_inverse : Union[bool, Expr]
        Whether to return an additional tensor with indices for where elements in
        the original input ended up in the returned unique list.
    return_counts : Union[bool, Expr]
        Whether to return an additional tensor with counts of each unique elements.
    axis : Optional
        The dimension to apply unique.
        If not specified, the unique values of the flattened input are returned.
    Returns
    -------
    ret : relax.Expr
        The created relax call with
    """
    if isinstance(sorted, bool):
        sorted = PrimValue(sorted)
    if isinstance(return_index, bool):
        return_index = PrimValue(return_index)
    if isinstance(return_inverse, bool):
        return_inverse = PrimValue(return_inverse)
    if isinstance(return_counts, bool):
        return_counts = PrimValue(return_counts)
    if axis and isinstance(axis, int):
        axis = PrimValue(axis)
    return _ffi_api.METHOD_NAME(  # type: ignore
        x, sorted, return_index, return_inverse, return_counts, axis
    )