def val_fmt_roman(
    x: X,
    case: str = "upper",
    pattern: str = "{x}",
) -> list[str]:
    """
    Format values as Roman numerals.

    With numeric values we can transform those to Roman numerals, rounding values as necessary.

    Parameters
    ----------
    x
        A list of values to be formatted.
    case
        Should Roman numerals should be rendered as uppercase (`"upper"`) or lowercase (`"lower"`)
        letters? By default, this is set to `"upper"`.
    pattern
        A formatting pattern that allows for decoration of the formatted value. The formatted value
        is represented by the `{x}` (which can be used multiple times, if needed) and all other
        characters will be interpreted as string literals.

    Returns
    -------
    list[str]
        A list of formatted values is returned.

    Examples
    --------
    ```{python}
    from great_tables import vals

    vals.fmt_roman([3, 5])
    ```
    """

    gt_obj: GTData = _make_one_col_table(vals=x)

    gt_obj_fmt = gt_obj.fmt_roman(
        columns="x",
        case=case,
        pattern=pattern,
    )

    vals_fmt = _get_column_of_values(gt=gt_obj_fmt, column_name="x", context="html")

    return vals_fmt

    Format values as Roman numerals.

    With numeric values we can transform those to Roman numerals, rounding values as necessary.

    Parameters
    ----------
    x
        A list of values to be formatted.
    case
        Should Roman numerals should be rendered as uppercase (`"upper"`) or lowercase (`"lower"`)
        letters? By default, this is set to `"upper"`.
    pattern
        A formatting pattern that allows for decoration of the formatted value. The formatted value
        is represented by the `{x}` (which can be used multiple times, if needed) and all other
        characters will be interpreted as string literals.

    Returns
    -------
    list[str]
        A list of formatted values is returned.

    Examples
    --------
    ```{python}
    from great_tables import vals

    vals.fmt_roman([3, 5])
    ```
    
great_tables/_formats_vals.py