code: def _upgrades(self, sid, transport):
          
          if not self.allow_upgrades or self._get_socket(sid).upgraded or \
                  self._async['websocket'] is None or transport == 'websocket':
              return []
          return ['websocket']
docs: Return the list of possible upgrades for a client connection.