from typing import BinaryIO
from typing import List


def _create_test_file(tfile: BinaryIO, nlines=10) -> List[str]:
    """Helper function for populating a testing temp file with numbered example lines for comparison"""
    lines = [f"This is an example line {i}\n".encode('utf-8') for i in range(1, nlines+1)]
    tfile.writelines(lines)
    tfile.flush()
    return [l.decode().strip("\n") for l in lines]