def pad(text: str, width: int, align: str = '<', fill: str = ' '):
    """
    pad the string with `fill` to length of `width`
    :param text: text to pad
    :param width: expected length
    :param align: left: <, center: ^, right: >
    :param fill: char to fill the padding
    :return:
    """
    assert align in ('<', '^', '>')
    return f"{text:{fill}{align}{width}}"