'Remove data from the instance that may cause side effects.'

def _unshelve_instance_key_scrub(self, instance):

    cleaned_keys = dict(key_data=instance.key_data, auto_disk_config=instance.auto_disk_config)
    instance.key_data = None
    instance.auto_disk_config = False
    return cleaned_keys
