code: def test_safety_settings(self, safety_settings):
      self.responses["generate_text"] = glm.GenerateTextResponse(
          candidates=[
              glm.TextCompletion(output="No"),
          ]
      )
      # This test really just checks that the safety_settings get converted to a proto.
      result = text_service.generate_text(
          prompt="Say something wicked.",
          safety_settings=safety_settings,
      )
  
      self.assertEqual(
          self.observed_requests[-1].safety_settings[0].category,
          safety_types.HarmCategory.HARM_CATEGORY_MEDICAL,
      )
  
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 8 for calling the UnitTests obj's underlying member method code with example usage: obj.test_safety_settings(safety_settings) without return types