<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):
        '''Save this configuration data into a dictionary.'''
        d = {'name': self.name}
        if self.data:
            d['data'] = self.data
        return d