def _get_instance_type(self, context, instance, prefix, migration):
        """Get the instance type from instance."""
        stashed_flavors = ('resize',) in migration.migration_type
        if stashed_flavors:
            return getattr(instance, '%sflavor' % prefix)
        else:
            # NOTE(ndipanov): Certain migration types (all but resize)
            # do not change flavors so there is no need to stash
            # them. In that case - just get the instance flavor.
            return instance.flavor
dataset/ETHPy150Open openstack/nova/nova/compute/resource_tracker.py/ResourceTracker._get_instance_type/swapped operands of `in`