<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):
 """Returns attributes formatted as a dictionary."""

        d = {'id': self.id, 'classes': self.classes}
        d.update(self.kvs)
        return d