@classmethod
  def from_uri(cls, uri):
    # TODO(termie): very simplistic
    #m = cls._re_jid.search(uri)
    node, rest = uri.split('@', 1)
    try:
      host, rest = rest.split('/', 1)
      resource = '/' + rest
    except __HOLE__:
      host = rest
      resource = '/'
    return cls(node, host, resource)
dataset/ETHPy150Open CollabQ/CollabQ/common/protocol/xmpp.py/JID.from_uri