human
I wrote the below code

    def _fake_fetch_disk_image(context, session, instance, name_label, image, image_type):
        if raise_failure:
            raise XenAPI.Failure('Test    Exception    raised    by    fake    fetch_image_glance_disk')
        elif (image_type == vm_utils.ImageType.KERNEL):
            filename = 'kernel'
        elif (image_type == vm_utils.ImageType.RAMDISK):
            filename = 'ramdisk'
        else:
            filename = 'unknown'
        vdi_type = vm_utils.ImageType.to_string(image_type)
        return {vdi_type: dict(uuid=None, file=filename)}
    stubs.Set(vm_utils, '_fetch_disk_image', _fake_fetch_disk_image)

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

def stubout_fetch_disk_image(stubs, raise_failure=False):