<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_json(self, with_volumes=True):
 """Augment the base `to_json` function, adding information about volumes Returns: `dict` """

        data = super().to_json()
        if with_volumes:
            data['volumes'] = [
                {
                    'volumeId': vol.id,
                    'volumeType': vol.volume_type,
                    'size': vol.size
                } for vol in self.volumes
            ]

        return data