class_docstr: Concrete model that uses the generate_content service.
code: def _generate_text(
      self,
      prompt: str,
      model: str | None = None,
      temperature: float | None = None,
      candidate_count: int | None = None,
  ) -> generation_types.GenerateContentResponse:
      gen_config = {}
      if temperature is not None:
          gen_config["temperature"] = temperature
      if candidate_count is not None:
          gen_config["candidate_count"] = candidate_count
  
      model_name = model or _DEFAULT_MODEL
      gen_model = genai.GenerativeModel(model_name=model_name)
      return gen_model.generate_content(
          prompt, generation_config=gen_config
      )
  
file_path: generative-ai-python/google/generativeai/notebook/text_model.py
imports: from __future__ import annotations
  from google.api_core import retry
  import google.generativeai
  from google.generativeai.types import generation_types
  from google.generativeai.notebook.lib import model
label_desc: Use image node_id 1 for calling the TextModel obj's underlying member method code with example usage: obj._generate_text(prompt, model, temperature, candidate_count) and returns: gen_model