code: def test_generate_response(self, *, prompt, **kwargs):
      self.responses["generate_text"] = glm.GenerateTextResponse(
          candidates=[
              glm.TextCompletion(output=" road?"),
              glm.TextCompletion(output=" bridge?"),
              glm.TextCompletion(output=" river?"),
          ]
      )
  
      complete = text_service.generate_text(prompt=prompt, **kwargs)
  
      self.assertEqual(
          self.observed_requests[-1],
          glm.GenerateTextRequest(
              model="models/text-bison-001",
              prompt=glm.TextPrompt(text=prompt),
              **kwargs,
          ),
      )
  
      self.assertIsInstance(complete.result, str)
  
      self.assertEqual(
          complete.candidates,
          [
              {"output": " road?", "safety_ratings": []},
              {"output": " bridge?", "safety_ratings": []},
              {"output": " river?", "safety_ratings": []},
          ],
      )
  
imports: import copy
  import math
  import unittest
  import unittest.mock
  import google.ai.generativelanguage
  from google.generativeai import text
  from google.generativeai import client
  from google.generativeai.types import safety_types
  from google.generativeai.types import model_types
  from absl.testing import absltest
  from absl.testing import parameterized
label_desc: Use image node_id 6 for calling the UnitTests obj's underlying member method code with example usage: obj.test_generate_response() without return types