/**
  * @param \GraphAware\Common\Result\Result $result
  *
  * @return \GraphAware\Common\Type\Node
  */
 public function validateInput($result)
 {
     if (count($result->records()) < 1 || !$result->getRecord()->value('input') instanceof Node) {
         throw new \InvalidArgumentException(sprintf('Node not found'));
     }
     return $result->getRecord()->value('input');
 }