original_string: public function filter_out_invalid_samples(&$sampleids, \core_analytics\analysable $analysable, $fortraining = true) {
          foreach ($sampleids as $sampleid => $unusedsampleid) {
              if (!$this->is_valid_sample($sampleid, $analysable, $fortraining)) {
                  // Skip it and remove the sample from the list of calculated samples.
                  unset($sampleids[$sampleid]);
              }
          }
      }
code: public function filter_out_invalid_samples(&$sampleids, \core_analytics\analysable $analysable, $fortraining = true) {
          foreach ($sampleids as $sampleid => $unusedsampleid) {
              if (!$this->is_valid_sample($sampleid, $analysable, $fortraining)) {
                  // Skip it and remove the sample from the list of calculated samples.
                  unset($sampleids[$sampleid]);
              }
          }
      }
code_tokens: public function filter_out_invalid_samples ( & $ sampleids , \ core_analytics \ analysable $ analysable , $ fortraining = true ) { foreach ( $ sampleids as $ sampleid => $ unusedsampleid ) { if ( ! $ this -> is_valid_sample ( $ sampleid , $ analysable , $ fortraining ) ) { // Skip it and remove the sample from the list of calculated samples. unset ( $ sampleids [ $ sampleid ] ) ; } } }
docstring: Filters out invalid samples for training.
  
  @param int[] $sampleids
  @param \core_analytics\analysable $analysable
  @param bool $fortraining
  @return void
docstring_tokens: Filters out invalid samples for training .