human
I wrote the below code

    old_environ = os.environ.copy()
    def cleanup():
        os.environ.clear()
        os.environ.update(old_environ)
    os.environ[key] = value
    case.addCleanup(cleanup)

What's a good function header?

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

def patch_environ(case, key, value):