(consumption_dict, domain, product_id, location_type, case_id)
return None
Recreates the couch view logic to access the most specific
    consumption value available for the passed options
Recreates the couch view logic to access the most specific
    consumption value available for the passed options
Recreates the couch view logic to access the most specific consumption value available for the passed options
def get_loaded_default_monthly_consumption(consumption_dict, domain, product_id, location_type, case_id):
    """
    Recreates the couch view logic to access the most specific
    consumption value available for the passed options
    """
    keys = [
        tuple([domain, product_id, None, case_id]),
        tuple([domain, product_id, location_type, None]),
        tuple([domain, product_id, None, None]),
        tuple([domain, None, None, None]),
    ]

    for key in keys:
        if key in consumption_dict:
            return consumption_dict[key]

    return None
def get_loaded_default_monthly_consumption ( consumption_dict , domain , product_id , location_type , case_id ) : keys = [ tuple ( [ domain , product_id , None , case_id ] ) , tuple ( [ domain , product_id , location_type , None ] ) , tuple ( [ domain , product_id , None , None ] ) , tuple ( [ domain , None , None , None ] ) , ] for key in keys : if key in consumption_dict : return consumption_dict [ key ] return None