Could use comprehension here
v_r = [node for node in nodes if not node.parent and node.visible]