code: def _make_generate_message_request(
      *,
      model: model_types.AnyModelNameOptions | None,
      context: str | None = None,
      examples: discuss_types.ExamplesOptions | None = None,
      messages: discuss_types.MessagesOptions | None = None,
      temperature: float | None = None,
      candidate_count: int | None = None,
      top_p: float | None = None,
      top_k: float | None = None,
      prompt: discuss_types.MessagePromptOptions | None = None,
  ) -> glm.GenerateMessageRequest:
      """Creates a `glm.GenerateMessageRequest` object for generating messages."""
      model = model_types.make_model_name(model)
  
      prompt = _make_message_prompt(
          prompt=prompt,
          context=context,
          examples=examples,
          messages=messages,
      )
  
      return glm.GenerateMessageRequest(
          model=model,
          prompt=prompt,
          temperature=temperature,
          top_p=top_p,
          top_k=top_k,
          candidate_count=candidate_count,
      )
  
imports: from __future__ import annotations
  import dataclasses
  import sys
  import textwrap
  from typing import Iterable, List, Optional, Union
  import google.ai.generativelanguage
  from google.generativeai.client import get_default_discuss_client
  from google.generativeai.client import get_default_discuss_async_client
  from google.generativeai import string_utils
  from google.generativeai.types import discuss_types
  from google.generativeai.types import model_types
  from google.generativeai.types import safety_types
label_desc: Use image node_id 8 for calling a global function with example usage: _make_generate_message_request() and returns: glm