human
I wrote the below code

    def always_fsync(ind_obj):
        def _inner():
            ind_obj.orig_flush()
            ind_obj.fsync()
        return _inner
    for index in db_obj.indexes:
        setattr(index, 'orig_flush', index.flush)
        setattr(index, 'flush', always_fsync(index))
    setattr(db_obj, 'orig_flush', db_obj.flush)
    setattr(db_obj, 'flush', always_fsync(db_obj))
    return

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

def patch_flush_fsync(db_obj):