@classmethod
def get_availability_fields(cls, listings, names):
    listing_ids = map(int, listings)
    values = defaultdict((lambda : dict.fromkeys(listing_ids, None)))
    for name in names:
        values[name]
    for listing in listings:
        if listing.product:
            availability = listing.get_availability()
            values['availability_type_used'][listing.id] = availability['type']
            values['availability_used'][listing.id] = availability.get('value')
            values['quantity'][listing.id] = availability.get('quantity')
    return values
@classmethod
def get_availability_fields(cls, listings, names):
    listing_ids = map(int, listings)
    values = defaultdict((lambda : dict.fromkeys(listing_ids, None)))
    for name in names:
        values[name]
    for listing in listings:
        if listing.product:
            availability = listing.get_availability()
            values['availability_type_used'][listing.id] = availability['type']
            values['availability_used'][listing.id] = availability.get('value')
            values['quantity'][listing.id] = availability.get('quantity')
    return values