<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send_key(self, key):
 """ Send the supplied keypress to the device """

        # Sanity check it's a valid key
        if key not in KEYS:
            return ['error', None]

        url = 'http://%s/WAN/%s/%s_ctrl.cgi' % (self._host, 'dvdr', 'dvdr')
        data = ('cCMD_RC_%s.x=100&cCMD_RC_%s.y=100' % (key, key)).encode()

        return self.send_cmd(url, data)