code: def send_messages(self, access_token, messages, timeout, current):
          
          is_submit = current and self.args.submit and not self.args.revise
          is_revision = current and self.args.revise
  
          data = {
              'assignment': self.assignment.endpoint,
              'messages': messages,
              'submit': is_submit
          }
  
          if is_revision:
              address = self.REVISION_ENDPOINT.format(server=self.assignment.server_url)
          else:
              address = self.BACKUP_ENDPOINT.format(server=self.assignment.server_url)
  
          address_params = {
              'client_name': 'ok-client',
              'client_version': client.__version__,
          }
  
          headers = {'Authorization': 'Bearer {}'.format(access_token)}
  
          log.info('Sending messages to %s', address)
          response = requests.post(address, headers=headers,
              params=address_params, json=data, timeout=timeout)
          response.raise_for_status()
          return response.json()
docs: Send messages to server, along with user authentication.