code: public static Pair<INDArray, INDArray> merge2d(@NonNull INDArray[][] arrays, INDArray[][] masks, int inOutIdx) {
          Pair<INDArray[], INDArray[]> p = selectColumnFromMDSData(arrays, masks, inOutIdx);
          return merge2d(p.getFirst(), p.getSecond());
      }
docs: Merge the specified 2d arrays and masks. See {@link #mergeFeatures(INDArray[], INDArray[])}
  and {@link #mergeLabels(INDArray[], INDArray[])}
  
  @param arrays   Arrays to merge
  @param masks    Mask arrays to merge
  @param inOutIdx Index to extract out before merging
  @return Merged arrays and mask