code: def setUp(self):
      self.client = unittest.mock.MagicMock()
  
      client._client_manager.clients["generative"] = self.client
      client._client_manager.clients["model"] = self.client
  
      self.observed_requests = []
  
      def add_client_method(f):
          name = f.__name__
          setattr(self.client, name, f)
          return f
  
      @add_client_method
      def embed_content(
          request: glm.EmbedContentRequest,
      ) -> glm.EmbedContentResponse:
          self.observed_requests.append(request)
          return glm.EmbedContentResponse(
              embedding=glm.ContentEmbedding(values=[1, 2, 3])
          )
  
      @add_client_method
      def batch_embed_contents(
          request: glm.BatchEmbedContentsRequest,
      ) -> glm.BatchEmbedContentsResponse:
          self.observed_requests.append(request)
          return glm.BatchEmbedContentsResponse(
              embeddings=[glm.ContentEmbedding(values=[1, 2, 3])]
              * len(request.requests)
          )
  
file_path: generative-ai-python/tests/test_embedding.py
imports: import copy
  import math
  import unittest
  import unittest.mock
  import google.ai.generativelanguage
  from google.generativeai import embedding
  from google.generativeai import client
  from absl.testing import absltest
  from absl.testing import parameterized
label_desc: Use image node_id 1 for calling the UnitTests obj's underlying member method code with example usage: obj.setUp() and returns: f, glm, glm