code: def select_subprotocol(self, subprotocols):
          '''Select a single Sec-WebSocket-Protocol during handshake.'''
          if isinstance(subprotocols, list) and subprotocols:
              self.log.info('Client sent subprotocols: {}'.format(subprotocols))
              return subprotocols[0]
          return super().select_subprotocol(subprotocolsf select_subprotocol(self, subprotocols):
          '''Select a single Sec-WebSocket-Protocol during handshake.'''
          if isinstance(subprotocols, list) and subprotocols:
              self.log.info('Client sent subprotocols: {}'.format(subprotocols))
              return subprotocols[0]
          return super().select_subprotocol(subprotocols)
docs: Select a single Sec-WebSocket-Protocol during handshake.