<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_relay_on(self):
 """Turn the relay on."""

        if not self.get_relay_state():
            try:
                request = requests.get(
                    '{}/relay'.format(self.resource), params={'state': '1'},
                    timeout=self.timeout)
                if request.status_code == 200:
                    self.data['relay'] = True
            except requests.exceptions.ConnectionError:
                raise exceptions.MyStromConnectionError()