def parse_server(node):
    """Return hostname and presence_id for given server.presence node."""
    if '#' not in node:
        return node, '-1'
    hostname, presence_id = node.split('#')
    return hostname, presence_id