<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_services(changeset):
 """Populate the change set with addCharm and deploy changes."""

    charms = {}
    for service_name, service in sorted(changeset.bundle['services'].items()):
        # Add the addCharm record if one hasn't been added yet.
        if service['charm'] not in charms:
            record_id = 'addCharm-{}'.format(changeset.next_action())
            changeset.send({
                'id': record_id,
                'method': 'addCharm',
                'args': [service['charm']],
                'requires': [],
            })
            charms[service['charm']] = record_id

        # Add the deploy record for this service.
        record_id = 'deploy-{}'.format(changeset.next_action())
        changeset.send({
            'id': record_id,
            'method': 'deploy',
            'args': [
                '${}'.format(charms[service['charm']]),
                service_name,
                service.get('options', {}),
                service.get('constraints', ''),
                service.get('storage', {}),
            ],
            'requires': [charms[service['charm']]],
        })
        changeset.services_added[service_name] = record_id

        # Expose this service if required.
        if service.get('expose'):
            changeset.send({
                'id': 'expose-{}'.format(changeset.next_action()),
                'method': 'expose',
                'args': ['${}'.format(record_id)],
                'requires': [record_id],
            })

        # Set the annotations for this service.
        if 'annotations' in service:
            changeset.send({
                'id': 'setAnnotations-{}'.format(changeset.next_action()),
                'method': 'setAnnotations',
                'args': [
                    '${}'.format(record_id),
                    'service',
                    service['annotations'],
                ],
                'requires': [record_id],
            })

    return handle_machines