<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):
 """Return a dict representation of the person."""

        d = {}
        if self.query_params_match is not None:
            d['@query_params_match'] = self.query_params_match
        if self.sources:
            d['sources'] = [source.to_dict() for source in self.sources]
        d.update(self.fields_to_dict())
        return d