def get_role(cx, role, default=None):
    """Retrieves a succesor node of a specific role.
    
    If node is not present, return default.
    """
    for node in cx.graph.succ[cx]:
        if cx.graph[cx][node]['role'] == role:
            return node
    return default