code: def write_early_data(self, data: bytes) -> int:
          
          if self._is_handshake_completed:
              raise IOError('SSL Handshake was completed; cannot send early data.')
  
          # Pass the cleartext data to the SSL engine
          self._ssl.write_early_data(data)
  
          # Recover the corresponding encrypted data
          final_length = self._flush_ssl_engine()
          return final_length
docs: Returns the number of (encrypted) bytes sent.