code: def _negotiate(self, data, connection):
          
  
          command, payload = data[0], data[1:]
          if command == NAWS:
              if len(payload) == 4:
                  columns, rows = struct.unpack(str('!HH'), bytes(payload))
                  connection.window_size_changed(columns, rows)
              else:
                  log.warning('Wrong number of NAWS bytes')
          else:
              log.debug("Not supported negotiation sequence, received {} bytes", len(data))
docs: Performs negotiation commands