def METHOD_NAME(self):
    pricing_types = (
        PRICING_EPHEMERAL,
        PRICING_HARD,
        PRICING_SPECIAL,
        PRICING_VM,
    )
    # Count nodes by type
    count_by_type = {t: 0 for t in pricing_types}
    for node in self.nodes:
        count_by_type[node.pricing_type] += 1
    # Yield metrics
    for pricing_type, count in count_by_type.items():
        yield {
            "name": self.metric,
            "group": self.group,
            "set": count,
            "labels": {
                "type": pricing_type.lower(),
            },
        }