<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, include_delta=True):
 """returning nothing except for just top-level keys for now. """

        if self.deleted:
            return {
                'timestamp': self.timestamp,
                'version': self.version
            }
        delta = self.parse_payload(self.desired, self.reported)
        payload = {}
        if self.desired is not None:
            payload['desired'] = self.desired
        if self.reported is not None:
            payload['reported'] = self.reported
        if include_delta and (delta is not None and len(delta.keys()) != 0):
            payload['delta'] = delta

        metadata = {}
        if self.metadata_desired is not None:
            metadata['desired'] = self.metadata_desired
        if self.metadata_reported is not None:
            metadata['reported'] = self.metadata_reported

        return {
            'state': payload,
            'metadata': metadata,
            'timestamp': self.timestamp,
            'version': self.version
        }