<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def identify(self, token):
 """ Identifies to the websocket endpoint Args: token (string):
 Discord bot token """


        payload = {
            'op': 2,
            'd': {
                'token': self.token,
                'properties': {
                    '$os': sys.platform,
                    '$browser': 'legobot',
                    '$device': 'legobot'
                },
                'compress': False,
                'large_threshold': 250
            }
        }
        payload['d']['synced_guilds'] = []
        logger.info("Identifying with the following message: \
                    {}".format(payload))
        self.ws.send(json.dumps(payload))
        return