original_string: public function iterate(iterable $iterable, ?int $max = null): iterable
      {
          $this->start($max ?? (\is_countable($iterable) ? \count($iterable) : 0));
  
          foreach ($iterable as $key => $value) {
              yield $key => $value;
  
              $this->advance();
          }
  
          $this->finish();
      }
code: public function iterate(iterable $iterable, ?int $max = null): iterable
      {
          $this->start($max ?? (\is_countable($iterable) ? \count($iterable) : 0));
  
          foreach ($iterable as $key => $value) {
              yield $key => $value;
  
              $this->advance();
          }
  
          $this->finish();
      }
code_tokens: public function iterate ( iterable $ iterable , ? int $ max = null ) : iterable { $ this -> start ( $ max ?? ( \ is_countable ( $ iterable ) ? \ count ( $ iterable ) : 0 ) ) ; foreach ( $ iterable as $ key => $ value ) { yield $ key => $ value ; $ this -> advance ( ) ; } $ this -> finish ( ) ; }
docstring: Returns an iterator that will automatically update the progress bar when iterated.
  
  @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable
docstring_tokens: Returns an iterator that will automatically update the progress bar when iterated .