code: def serialize(self, raw=False):
          '''Encode the private part of the key in a base64 format by default,
          but when raw is True it will return hex encoded bytes.
          @return: bytes
          '''
          if raw:
              return self._key.encode()
          return self._key.encode(nacl.encoding.Base64Encoderf serialize(self, raw=False):
          '''Encode the private part of the key in a base64 format by default,
          but when raw is True it will return hex encoded bytes.
          @return: bytes
          '''
          if raw:
              return self._key.encode()
          return self._key.encode(nacl.encoding.Base64Encoder)
docs: Encode the private part of the key in a base64 format by default,
          but when raw is True it will return hex encoded bytes.
          @return: bytes