def tab_footnote(
    self: GTSelf,
    footnote: str | list[str],
    locations: Loc | None | list[Loc | None],
    placement: PlacementOptions = "auto",
) -> GTSelf:
    """Add a footnote to a table

    Parameters
    ----------
    footnote
        The footnote text.
    locations
        The location to place the footnote. If None, then a footnote is created without
        a correesponding marker on the table (TODO: double check this).
    placement
        Where to affix the footnote marks to the table content.

    """

    if isinstance(footnote, list):
        raise NotImplementedError("Currently, only a single string is supported for footnote.")

    if not isinstance(locations, list):
        locations = [locations]

    new_data = self
    if isinstance(locations, list):
        for loc in locations:
            new_data = set_footnote(loc, self, footnote, placement)

    return new_data
Add a footnote to a table

    Parameters
    ----------
    footnote
        The footnote text.
    locations
        The location to place the footnote. If None, then a footnote is created without
        a correesponding marker on the table (TODO: double check this).
    placement
        Where to affix the footnote marks to the table content.

    
great_tables/_tab_create_modify.py