code: def send_data(self, message):
          '''
              Given an object, encode as JSON and transmit to the server.
          '''
          #logger.debug("TX:\n%s", json.dumps(message, indent=2))
          data = json.dumps(message).encode('utf-8') + b'\n'
          self.transport.write(dataf send_data(self, message):
          '''
              Given an object, encode as JSON and transmit to the server.
          '''
          #logger.debug("TX:\n%s", json.dumps(message, indent=2))
          data = json.dumps(message).encode('utf-8') + b'\n'
          self.transport.write(data)
docs: Given an object, encode as JSON and transmit to the server.