code: public static void addToDataSource(DataSource parent, DataSource child) {
          if (!parent.getLeftDataSource().isPresent()) {
              parent.setLeftDataSource(child);
          } else if (!parent.getRightDataSource().isPresent()) {
              parent.setRightDataSource(child);
          } else {
              DataSource newLeftDataSource = new DataSource(parent.getLeftDataSource().get());
              newLeftDataSource.setRightDataSource(parent.getRightDataSource().get());
              parent.setLeftDataSource(newLeftDataSource);
              parent.setRightDataSource(child);
          }
      }
docs: Builds optimized data source as a tree
  @param parent data source to add child to
  @param child child data source