'To attempt to address out-of-order messages, do some sanity
checking on the VM states.  Add some requirements for
vm_state to the instance.save() call if necessary.'

def _get_expected_vm_state(self, instance):

    expected_vm_state_map = {vm_states.BUILDING: [vm_states.BUILDING, None]}
    if instance.obj_attr_is_set('vm_state'):
        return expected_vm_state_map.get(instance.vm_state)
