def _get_flavor_info(self, exist):
        flavor = exist.instance_flavor_id
        if flavor not in self.flavor_cache:
            if '-' in flavor:
                flavor_class, n = flavor.split('-', 1)
            else:
                flavor_class = 'standard'
            try:
                payload = json.loads(exist.raw.json)[1]['payload']
            except Exception:
                print "Error loading raw notification data for %s" % exist.id
                raise
            flavor_name = payload['instance_type']
            flavor_size = payload['memory_mb']
            weight = self.FLAVOR_CLASS_WEIGHTS.get(flavor_class, 1.0)
            flavor_units = (flavor_size/256.0) * weight
            self.flavor_cache[flavor] = (flavor, flavor_name, flavor_class, flavor_units)
        return self.flavor_cache[flavor]
dataset/ETHPy150Open openstack/stacktach/reports/instance_hours.py/InstanceHoursReport._get_flavor_info/original