def METHOD_NAME(self, value):
    for dp_type in settings.DATA_PRODUCT_TYPES.keys():
        if not value or value == dp_type:
            break
    else:
        raise serializers.ValidationError('Not a valid data_product_type. Valid data_product_types are {0}.'
                                          .format(', '.join(k for k in settings.DATA_PRODUCT_TYPES.keys())))
    return value