def value(self, **kwargs):
        raw_value = kwargs[self.name]
        choice = transform_from_datatype(self.datatype)(raw_value) if raw_value != SHOW_ALL_CHOICE else raw_value
        choice_values = map(lambda c: c.value, self.choices)
        if choice not in choice_values:
            raise FilterValueException(_(u'Choice "{choice}" not found in choices: {choices}')
                                       .format(choice=choice,
                                               choices=choice_values))
        return next(choice_obj for choice_obj in self.choices if choice_obj.value == choice)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/reports_core/filters.py/ChoiceListFilter.value/original