original_string: protected function getSplitNodesByColumn(int $column, DecisionTreeLeaf $node): array
      {
          if ($node->isTerminal) {
              return [];
          }
  
          $nodes = [];
          if ($node->columnIndex === $column) {
              $nodes[] = $node;
          }
  
          $lNodes = [];
          $rNodes = [];
          if ($node->leftLeaf !== null) {
              $lNodes = $this->getSplitNodesByColumn($column, $node->leftLeaf);
          }
  
          if ($node->rightLeaf !== null) {
              $rNodes = $this->getSplitNodesByColumn($column, $node->rightLeaf);
          }
  
          return array_merge($nodes, $lNodes, $rNodes);
      }
code: protected function getSplitNodesByColumn(int $column, DecisionTreeLeaf $node): array
      {
          if ($node->isTerminal) {
              return [];
          }
  
          $nodes = [];
          if ($node->columnIndex === $column) {
              $nodes[] = $node;
          }
  
          $lNodes = [];
          $rNodes = [];
          if ($node->leftLeaf !== null) {
              $lNodes = $this->getSplitNodesByColumn($column, $node->leftLeaf);
          }
  
          if ($node->rightLeaf !== null) {
              $rNodes = $this->getSplitNodesByColumn($column, $node->rightLeaf);
          }
  
          return array_merge($nodes, $lNodes, $rNodes);
      }
code_tokens: protected function getSplitNodesByColumn ( int $ column , DecisionTreeLeaf $ node ) : array { if ( $ node -> isTerminal ) { return [ ] ; } $ nodes = [ ] ; if ( $ node -> columnIndex === $ column ) { $ nodes [ ] = $ node ; } $ lNodes = [ ] ; $ rNodes = [ ] ; if ( $ node -> leftLeaf !== null ) { $ lNodes = $ this -> getSplitNodesByColumn ( $ column , $ node -> leftLeaf ) ; } if ( $ node -> rightLeaf !== null ) { $ rNodes = $ this -> getSplitNodesByColumn ( $ column , $ node -> rightLeaf ) ; } return array_merge ( $ nodes , $ lNodes , $ rNodes ) ; }
docstring: Collects and returns an array of internal nodes that use the given
  column as a split criterion
docstring_tokens: Collects and returns an array of internal nodes that use the given column as a split criterion