<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def opened(self):
 """Handler called when the WebSocket connection is opened. The first thing to do then is to authenticate ourselves."""

        request = {
            'type': 'authenticate',
            'token': self._token,
            'userAgent': '{} ws4py/{}'.format(version.user_agent,
                                              ws4py.__version__),
        }
        self.send(json.dumps(request))