def generate_line(writer, seed):
    """Returns a line of generated text using a given writer and seed"""
    line = ""
    token = None
    generator = writer.generate(seed)
    while token != "\n":
        token = next(generator)
        line += token
    return line