(self, market: InstanceMarket)
Returns the weight of a given market

        ASGs can be defined with different instance weights. If we can find
        the weight for a given instance type, we return it. Otherwise we
        default to 1.

        :param market: The market for which we want the weight for
        :returns: The weight of a given market
Returns the weight of a given market
Returns the weight of a given market
def market_weight(self, market: InstanceMarket) -> float:
        """ Returns the weight of a given market

        ASGs can be defined with different instance weights. If we can find
        the weight for a given instance type, we return it. Otherwise we
        default to 1.

        :param market: The market for which we want the weight for
        :returns: The weight of a given market
        """
        if market.az in self._group_config["AvailabilityZones"]:
            for instance in self._group_config.get("Instances", []):
                if market.instance == instance.get("InstanceType"):
                    return int(instance.get("WeightedCapacity", "1"))
            return 1
        else:
            return 0
def market_weight ( self , market : InstanceMarket ) -> float : if market . az in self . _group_config [ "AvailabilityZones" ] : for instance in self . _group_config . get ( "Instances" , [ ] ) : if market . instance == instance . get ( "InstanceType" ) : return int ( instance . get ( "WeightedCapacity" , "1" ) ) return 1 else : return 0