def paddedWord(word: str, max_length: int, centered: bool = False, extra_spaces:int = 2) -> str:
    """ Just adds spaces around the given word.
    Args:
        word (str): Word to add padding.
        max_length (int): Essentially the legth of the largest word.
        centered (bool): If the word should be centered within it's cell.
        extra_spaces (int): It requires at least one space on either side for the wider item.
    Returns:
        str: Word with added padding.
    """
    total_length = max_length + extra_spaces
    if centered:
        return word.center(total_length, " ")
    
    _word = word.rjust(min(int(extra_spaces/2)+len(word), total_length), " ")
    return _word.ljust(total_length, " ")