<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_text(filename: str, text: str) -> None: """ Writes text to a file. """

    with open(filename, 'w') as f:  # type: TextIO
        print(text, file=f)