def make_field_producer(idx, v):

    def producer(item):
        if raw:
            return item[idx]
        model = v.get_model()
        attrs = model._parse_attrs({v.attr_name: item[idx]})
        return attrs[v.attr_name]
    return producer
def make_field_producer(idx, v):

    def producer(item):
        if raw:
            return item[idx]
        model = v.get_model()
        attrs = model._parse_attrs({v.attr_name: item[idx]})
        return attrs[v.attr_name]
    return producer