<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_dict(self):
 """Convert WordSet into raw dictionary data."""

        return {
            'id': self.set_id,
            'title': self.title,
            'terms': [term.to_dict() for term in self.terms]
        }