code: protected function sortTree($node1, $node2)
      {
          $order1 = $node1['node']['order'];
          $order2 = $node2['node']['order'];
  
          if ($order1 == $order2 || $order1 == -1 || $order2 == -1) {
              return 0;
          }
  
          return ($order1 < $order2) ? -1 : 1;
      }
docs: @param ReadNodeInterface $node1
  @param ReadNodeInterface $node2
  
  @return int