original_string: public function get_training_ranges() {
          // Cloning the array.
          $trainingranges = $this->ranges;
  
          foreach ($trainingranges as $rangeindex => $range) {
              if (!$this->ready_to_train($range)) {
                  unset($trainingranges[$rangeindex]);
              }
          }
  
          return $trainingranges;
      }
code: public function get_training_ranges() {
          // Cloning the array.
          $trainingranges = $this->ranges;
  
          foreach ($trainingranges as $rangeindex => $range) {
              if (!$this->ready_to_train($range)) {
                  unset($trainingranges[$rangeindex]);
              }
          }
  
          return $trainingranges;
      }
code_tokens: public function get_training_ranges ( ) { // Cloning the array. $ trainingranges = $ this -> ranges ; foreach ( $ trainingranges as $ rangeindex => $ range ) { if ( ! $ this -> ready_to_train ( $ range ) ) { unset ( $ trainingranges [ $ rangeindex ] ) ; } } return $ trainingranges ; }
docstring: Overwritting as the last range may be for prediction.
  
  @return array
docstring_tokens: Overwritting as the last range may be for prediction .