code: def deserialize_compact(jwt):
      
      parts = jwt.split('.')
  
      if len(parts) == 3:
          token_type = JWS
      elif len(parts) == 5:
          token_type = JWE
      else:
          raise Error('Malformed JWT')
  
      return token_type(*parts)
docs: Deserialization of a compact representation of a :class:`~jwt.JWE`
  
      :param jwt: The serialized JWT to deserialize.
      :rtype: :class:`~jose.JWT`.
      :raises: :class:`~jose.Error` if the JWT is malformed