generateExampleBeginIndices_() {
    // Prepare beginning indices of examples.
    this.exampleBeginIndices_ = [];
    for (let i = 0;
        i < this.textLen_ - this.sampleLen_ - 1;
        i += this.sampleStep_) {
      this.exampleBeginIndices_.push(i);
    }

    // Randomly shuffle the beginning indices.
    tf.util.shuffle(this.exampleBeginIndices_);
    this.examplePosition_ = 0;
  }
Generate the example-begin indices; shuffle them randomly.