code: public MultiDataSetIterator getTrainIterator() {
          return new MultiDataSetIterator() {
              @Override
              public MultiDataSet next(int num) {
                  throw new UnsupportedOperationException("To be implemented yet");
              }
  
              @Override
              public void setPreProcessor(MultiDataSetPreProcessor preProcessor) {
                  backedIterator.setPreProcessor(preProcessor);
              }
  
              @Override
              public MultiDataSetPreProcessor getPreProcessor() {
                  return backedIterator.getPreProcessor();
              }
  
              @Override
              public boolean resetSupported() {
                  return backedIterator.resetSupported();
              }
  
              @Override
              public boolean asyncSupported() {
                  return backedIterator.asyncSupported();
              }
  
              @Override
              public void reset() {
                  resetPending.set(true);
              }
  
              @Override
              public boolean hasNext() {
                  if (resetPending.get()) {
                      if (resetSupported()) {
                          backedIterator.reset();
                          counter.set(0);
                          resetPending.set(false);
                      } else
                          throw new UnsupportedOperationException("Reset isn't supported by underlying iterator");
                  }
  
                  val state = backedIterator.hasNext();
                  if (state && counter.get() < numTrain)
                      return true;
                  else
                      return false;
              }
  
              @Override
              public MultiDataSet next() {
                  counter.incrementAndGet();
                  val p = backedIterator.next();
  
                  if (counter.get() == 1 && firstTrain == null) {
                      // first epoch ever, we'll save first dataset and will use it to check for equality later
                      firstTrain = (org.nd4j.linalg.dataset.MultiDataSet) p.copy();
                      firstTrain.detach();
                  } else if (counter.get() == 1) {
                      // epoch > 1, comparing first dataset to previously stored dataset. they should be equal
                      int cnt = 0;
                      for (val c: p.getFeatures())
                          if (!c.equalsWithEps(firstTrain.getFeatures()[cnt++], 1e-5))
                              throw new ND4JIllegalStateException("First examples do not match. Randomization was used?");
                  }
  
                  return p;
              }
  
              @Override
              public void remove() {
                  throw new UnsupportedOperationException();
              }
          };
      }
docs: This method returns train iterator instance
  
  @return