code: def encode(cls, s):
          
          b = ByteString(s)
          be = base64.b64encode(b).strip()
          return String(be)
docs: converts a plain text string to base64 encoding
  
          :param s: unicode str|bytes, the base64 encoded string
          :returns: unicode str