def format_string(x: int, frame: str) -> str:
    """Helper function to format individual time frames.

    :param x: Integer
    :param frame: Time frame
    :return: Formatted time string
    """
    return '' if x == 0 else f' {x} {frame} ' if x == 1 else f' {x} {frame}s '