def get_top_namespace(node):
    """Return the top namespace of the given node

    If the node has not namespace (only root), ":" is returned.
    Else the top namespace (after root) is returned

    :param node: the node to query
    :type node: str
    :returns: The top level namespace.
    :rtype: str
    :raises: None
    """
    name = node.rsplit('|', 1)[-1]
    name = name.lstrip(':')
    if ':' not in name:
        return ':'
    else:
        return name.partition(':')[0]
