code: def send_message(self, data):
          
          opcode = BINARY
          if _check_unicode(data):
              opcode = TEXT
  
          self._send_message(False, opcode, data)
docs: Send websocket data frame to the client.
  
            If data is a unicode object then the frame is sent as Text.
            If the data is a bytearray object then the frame is sent as Binary.