code: def list_models(
      *,
      page_size: int | None = 50,
      client: glm.ModelServiceClient | None = None,
  ) -> model_types.ModelsIterable:
      """Lists available models.
  
      ```
      import pprint
      for model in genai.list_models():
          pprint.pprint(model)
      ```
  
      Args:
          page_size: How many `types.Models` to fetch per page (api call).
          client: You may pass a `glm.ModelServiceClient` instead of using the default client.
  
      Yields:
          `types.Model` objects.
  
      """
      if client is None:
          client = get_default_model_client()
  
      for model in client.list_models(page_size=page_size):
          model = type(model).to_dict(model)
          yield model_types.Model(**model)
  
imports: from __future__ import annotations
  import typing
  from typing import Any, Literal
  import google.ai.generativelanguage
  from google.generativeai import operations
  from google.generativeai.client import get_default_model_client
  from google.generativeai.types import model_types
  from google.api_core import operation
  from google.api_core import protobuf_helpers
  from google.protobuf import field_mask_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: list_models() without return types