def METHOD_NAME(
    self, ctx: handler.HandlerContext, resource: PGAllocationResource
) -> None:
    if not self._allocator.has_allocation_in_inventory(resource.service_id):
        raise ResourcePurged()