human
I wrote the below code

    @functools.wraps(function)
    def decorated_function(self, *args, **kwargs):
        @contextlib.contextmanager
        def fake_vdi_attached(*args, **kwargs):
            fake_dev = 'fakedev'
            (yield fake_dev)
        def fake_image_download(*args, **kwargs):
            pass
        orig_vdi_attached = vm_utils.vdi_attached
        orig_image_download = fake_image._FakeImageService.download
        try:
            vm_utils.vdi_attached = fake_vdi_attached
            fake_image._FakeImageService.download = fake_image_download
            return function(self, *args, **kwargs)
        finally:
            fake_image._FakeImageService.download = orig_image_download
            vm_utils.vdi_attached = orig_vdi_attached
    return decorated_function

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

def stub_vm_utils_with_vdi_attached(function):