def name_split_node(name):
    """Splits `name` into 'processname', 'nodename' components."""
    assert '@' not in name
    comps = name.split('#')
    if len(comps) == 2:
        return tuple(comps)
    elif len(comps) == 1:
        return comps[0], comps[0]
    else:
        return None, None
