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