def _process_fields(self, data):
        """Convert extracted data into ItemField fields."""
        schema, modifiers, page = self.schema, self.modifiers, self.htmlpage
        fields = {}
        for field_num, (field, value) in enumerate(self._normalize_data(data)):
            # Repeated Fields and nested items support
            if hasattr(field, 'fields'):
                self._add_item(field, fields)
                continue
            # New style annotation field
            elif isinstance(field, dict):
                field_id = field.get(u'id') or field_num
            # Legacy attribute, field mapping annotation
            else:
                field_id = field_num
                field = {u'field': field, u'id': field_id,
                         u'attribute': u'content'}
            field_cls = self._field_class(field['field'])
            fields[field_id] = field_cls(value, field, schema, modifiers, page)
        return fields
Convert extracted data into ItemField fields.
slybot/slybot/plugins/scrapely_annotations/processors.py