Return a dict representation of KnwKBDDEF.

def to_dict(self):
        """Return a dict representation of KnwKBDDEF."""
        return {'field': self.output_tag,
                'expression': self.search_expression,
                'coll_id': self.id_collection,
                'collection': self.collection.name
                if self.collection else None}