from typing import List
from typing import Any
from typing import Optional


def get_len_of_longest_word(rows: List[List[Any]], labels: Optional[List[Any]] = None) -> List[int]:
    """Return List of len of largest word in each column.

    Args:
        rows (List[List[Any]]): Table
        labels (Optional[List[Any]], optional): Table header. Defaults to None.

    Returns:
        List[int]: List of len of largest word in each column.
    """
    res = [0] * len(rows[0])
    if labels:
        for i, itm in enumerate(labels):
            res[i] = len(str(itm))
    for row in rows:
        for i, itm in enumerate(row):
            itm_len = len(str(itm))
            res[i] = itm_len if res[i] < itm_len else res[i]
    return res