human
I wrote the below code

    def callback(data):
        variable.write(data)
        return
    return callback

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

def data_callback_factory(variable):