docstr: A tqdm wait bar, yields `Operation` statuses until complete.
  
  Args:
      **kwargs: passed through to `tqdm.auto.tqdm(..., **kwargs)`
  
  Yields:
      Operation statuses as `glm.CreateTunedModelMetadata` objects.
docstr_tok: ["A","tqdm","wait","bar",",","yields","`","Operation","`","statuses","until","complete",".","Args",":","*","*","kwargs",":","passed","through","to","`","tqdm.auto.tqdm","(","...",",","*","*","kwargs",")","`","Yields",":","Operation","statuses","as","`","glm.CreateTunedModelMetadata","`","objects","."]
code: def wait_bar(
      self, **kwargs
  ) -> Iterator[glm.CreateTunedModelMetadata]:
      """A tqdm wait bar, yields `Operation` statuses until complete.
  
      Args:
          **kwargs: passed through to `tqdm.auto.tqdm(..., **kwargs)`
  
      Yields:
          Operation statuses as `glm.CreateTunedModelMetadata` objects.
      """
      bar = tqdm.tqdm(
          total=self.metadata.total_steps, initial=0, **kwargs
      )
  
      # done() includes a `_refresh_and_update`
      while not self.done():
          metadata = self.metadata
          bar.update(self.metadata.completed_steps - bar.n)
          yield metadata
      metadata = self.metadata
      bar.update(self.metadata.completed_steps - bar.n)
      return self.result()
  
file_path: generative-ai-python/google/generativeai/operations.py
imports: from __future__ import annotations
  import functools
  from typing import Iterator
  from google.ai import generativelanguage
  from google.generativeai import client
  from google.generativeai.types import model_types
  from google.api_core import operation
  import tqdm.auto
label_desc: Use image node_id 5 for calling the CreateTunedModelOperation obj's underlying member method code with example usage: obj.wait_bar() and returns: self