code: def count_message_tokens(
      *,
      prompt: discuss_types.MessagePromptOptions = None,
      context: str | None = None,
      examples: discuss_types.ExamplesOptions | None = None,
      messages: discuss_types.MessagesOptions | None = None,
      model: model_types.AnyModelNameOptions = DEFAULT_DISCUSS_MODEL,
      client: glm.DiscussServiceAsyncClient | None = None,
  ) -> discuss_types.TokenCount:
      model = model_types.make_model_name(model)
      prompt = _make_message_prompt(
          prompt, context=context, examples=examples, messages=messages
      )
  
      if client is None:
          client = get_default_discuss_client()
  
      result = client.count_message_tokens(model=model, prompt=prompt)
  
      return type(result).to_dict(result)
  
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 12 for calling a global function with example usage: count_message_tokens() and returns: type