public function getSingleNodeByLabel($label)
    {
        foreach ($this->nodes as $node) {
            if ($node->hasLabel($label)) {
                return $node;
            }
        }

        return;
    }
public function getSingleNodeByLabel($label)
    {
        foreach ($this->nodes as $node) {
            if ($node->hasLabel($label)) {
                return $node;
            }
        }

        return;
    }
public function getSingleNodeByLabel ( $ label ) { foreach ( $ this -> nodes as $ node ) { if ( $ node -> hasLabel ( $ label ) ) { return $ node ; } } return ; }
Returns a single node for a given label.

@param string $label The label to match for

@return Node|null The Node or null if not node found matching the label
Returns a single node for a given label .