def opt_all_caps(
    self: GTSelf,
    all_caps: bool = True,
    locations: str | list[str] = ["column_labels", "stub", "row_group"],
) -> GTSelf:
    """
    Option to use all caps in select table locations.

    Sometimes an all-capitalized look is suitable for a table. By using `opt_all_caps()`, we can
    transform characters in the column labels, the stub, and in all row groups in this way (and
    there's control over which of these locations are transformed). This method serves as a
    convenient shortcut for `tab_options(<location>_text_transform="uppercase",
    <location>_font_size="80%", <location>_font_weight="bolder")` (for all `locations` selected).

    Parameters
    ----------
    all_caps
        Indicates whether the text transformation to all caps should be performed (`True`, the
        default) or reset to default values (`False`) for the `locations` targeted.

    locations
        Which locations should undergo this text transformation? By default it includes all of
        the `"column_labels"`, the `"stub"`, and the `"row_group"` locations. However, we could
        just choose one or two of those.

    Returns
    -------
    GT
        The GT object is returned. This is the same object that the method is called on so that we
        can facilitate method chaining.

    Examples
    --------
    Using select columns from the `exibble` dataset, let's create a table with a number of
    components added. Following that, we'll ensure that all text in the column labels, the stub, and
    in all row groups is transformed to all caps using the `opt_all_caps()` method.

    ```{python}
    from great_tables import GT, exibble, md

    (
      GT(
        exibble[["num", "char", "currency", "row", "group"]],
        rowname_col="row",
        groupname_col="group"
      )
      .tab_header(
        title=md("Data listing from **exibble**"),
        subtitle=md("`exibble` is a **Great Tables** dataset.")
      )
      .fmt_number(columns="num")
      .fmt_currency(columns="currency")
      .tab_source_note(source_note="This is only a subset of the dataset.")
      .opt_all_caps()
    )
    ```
    """

    # If providing a scalar string value, normalize it to be in a list
    if not isinstance(locations, list):
        locations = _utils._str_scalar_to_list(cast(str, locations))

    # Ensure that the `locations` value is a list of strings
    _utils._assert_str_list(locations)

    # TODO: Ensure that all values within `locations` are valid

    # Set new options for `locations` selected, or, reset to default options
    # if `all_caps` is False
    # TODO: the code constantly reassigns res, in order to prepare for a
    # world where options are not mutating the GT options object.
    # TODO: is there a way to set multiple options at once?
    res = self
    if all_caps:
        if "column_labels" in locations:
            res = tab_options(res, column_labels_font_size="80%")
            res = tab_options(res, column_labels_font_weight="bolder")
            res = tab_options(res, column_labels_text_transform="uppercase")

        if "stub" in locations:
            res = tab_options(res, stub_font_size="80%")
            res = tab_options(res, stub_font_weight="bolder")
            res = tab_options(res, stub_text_transform="uppercase")

        if "row_group" in locations:
            res = tab_options(res, row_group_font_size="80%")
            res = tab_options(res, row_group_font_weight="bolder")
            res = tab_options(res, row_group_text_transform="uppercase")

    else:
        res = tab_options(res, column_labels_font_size="100%")
        res = tab_options(res, column_labels_font_weight="normal")
        res = tab_options(res, column_labels_text_transform="inherit")
        res = tab_options(res, stub_font_size="100%")
        res = tab_options(res, stub_font_weight="initial")
        res = tab_options(res, stub_text_transform="inherit")
        res = tab_options(res, row_group_font_size="100%")
        res = tab_options(res, row_group_font_weight="initial")
        res = tab_options(res, row_group_text_transform="inherit")

    return res

    Option to use all caps in select table locations.

    Sometimes an all-capitalized look is suitable for a table. By using `opt_all_caps()`, we can
    transform characters in the column labels, the stub, and in all row groups in this way (and
    there's control over which of these locations are transformed). This method serves as a
    convenient shortcut for `tab_options(<location>_text_transform="uppercase",
    <location>_font_size="80%", <location>_font_weight="bolder")` (for all `locations` selected).

    Parameters
    ----------
    all_caps
        Indicates whether the text transformation to all caps should be performed (`True`, the
        default) or reset to default values (`False`) for the `locations` targeted.

    locations
        Which locations should undergo this text transformation? By default it includes all of
        the `"column_labels"`, the `"stub"`, and the `"row_group"` locations. However, we could
        just choose one or two of those.

    Returns
    -------
    GT
        The GT object is returned. This is the same object that the method is called on so that we
        can facilitate method chaining.

    Examples
    --------
    Using select columns from the `exibble` dataset, let's create a table with a number of
    components added. Following that, we'll ensure that all text in the column labels, the stub, and
    in all row groups is transformed to all caps using the `opt_all_caps()` method.

    ```{python}
    from great_tables import GT, exibble, md

    (
      GT(
        exibble[["num", "char", "currency", "row", "group"]],
        rowname_col="row",
        groupname_col="group"
      )
      .tab_header(
        title=md("Data listing from **exibble**"),
        subtitle=md("`exibble` is a **Great Tables** dataset.")
      )
      .fmt_number(columns="num")
      .fmt_currency(columns="currency")
      .tab_source_note(source_note="This is only a subset of the dataset.")
      .opt_all_caps()
    )
    ```
    
great_tables/_options.py