<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def restart(self, instance_id):
 """restarts a paused instance. :param str instance_id: instance identifier :return: None """

        try:
            if not self._paused:
                log.debug("node %s is not paused, can't restart", instance_id)
                return
            self._paused = False
            result = self._subscription._sms.start_role(
                service_name=self._cloud_service._name,
                deployment_name=self._cloud_service._name,
                role_name=instance_id)
            self._subscription._wait_result(result)
        except Exception as exc:
            log.error('error restarting instance %s: %s', instance_id, exc)
            raise
        log.debug('restarted instance(instance_id=%s)', instance_id)