parameters: (self, cmd, get_response=True)
docstring: Send a command to the Chirp server
  
          :param cmd: The command to be sent
          :param get_response: Check for a response and return it
          :returns: The response from the Chirp server (if get_response is True)
          :raises InvalidRequest: If the command is invalid
          :raises RuntimeError: If the connection is broken
docstring_summary: Send a command to the Chirp server
docstring_tokens: Send a command to the Chirp server
function: def _simple_command(self, cmd, get_response=True):
          """Send a command to the Chirp server
  
          :param cmd: The command to be sent
          :param get_response: Check for a response and return it
          :returns: The response from the Chirp server (if get_response is True)
          :raises InvalidRequest: If the command is invalid
          :raises RuntimeError: If the connection is broken
  
          """
  
          # check that client is connected
          self._check_connection()
  
          # check the command
          if cmd[-1] != "\n":
              raise self.InvalidRequest("The form of the request is invalid.")
          cmd = cmd.encode()
  
          # send the command
          bytes_sent = 0
          while bytes_sent < len(cmd):
              sent = self.socket.send(cmd[bytes_sent:])
              if sent == 0:
                  raise RuntimeError("Connection to the Chirp server is broken.")
              bytes_sent = bytes_sent + sent
  
          if get_response:
              return self._simple_response()
function_tokens: def _simple_command ( self , cmd , get_response = True ) : # check that client is connected self . _check_connection ( ) # check the command if cmd [ - 1 ] != "\n" : raise self . InvalidRequest ( "The form of the request is invalid." ) cmd = cmd . encode ( ) # send the command bytes_sent = 0 while bytes_sent < len ( cmd ) : sent = self . socket . send ( cmd [ bytes_sent : ] ) if sent == 0 : raise RuntimeError ( "Connection to the Chirp server is broken." ) bytes_sent = bytes_sent + sent if get_response : return self . _simple_response ( )