human
I wrote the below code

    @wraps(f)
    def f_in_file(fname, *args, **kwargs):
        with io.open(fname, 'r', encoding='utf-8') as inf:
            data = inf.read()
        data = f(data, *args, **kwargs)
        with io.open(fname, 'w+', encoding='utf-8') as outf:
            outf.write(data)
    return f_in_file

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def apply_to_text_file(f):