code: def test_embed(
      self,
      l2_normalize,
      quantize,
      with_roi,
      model_file_type,
      expected_similarity,
      expected_size,
      expected_first_values,
  ):
      # Creates embedder.
      if model_file_type is ModelFileType.FILE_NAME:
          base_options = _BaseOptions(model_asset_path=self.model_path)
      elif model_file_type is ModelFileType.FILE_CONTENT:
          with open(self.model_path, "rb") as f:
              model_content = f.read()
          base_options = _BaseOptions(model_asset_buffer=model_content)
      else:
          # Should never happen
          raise ValueError("model_file_type is invalid.")
  
      options = _ImageEmbedderOptions(
          base_options=base_options,
          l2_normalize=l2_normalize,
          quantize=quantize,
      )
      embedder = _ImageEmbedder.create_from_options(options)
  
      image_processing_options = None
      if with_roi:
          # Region-of-interest in "burger.jpg" corresponding to "burger_crop.jpg".
          roi = _Rect(left=0, top=0, right=0.833333, bottom=1)
          image_processing_options = _ImageProcessingOptions(roi)
  
      # Extracts both embeddings.
      image_result = embedder.embed(
          self.test_image, image_processing_options
      )
      crop_result = embedder.embed(self.test_cropped_image)
  
      # Checks embeddings and cosine similarity.
      (
          expected_result0_value,
          expected_result1_value,
      ) = expected_first_values
      self._check_embedding_size(image_result, quantize, expected_size)
      self._check_embedding_size(crop_result, quantize, expected_size)
      self._check_embedding_value(image_result, expected_result0_value)
      self._check_embedding_value(crop_result, expected_result1_value)
      self._check_cosine_similarity(
          image_result, crop_result, expected_similarity
      )
      # Closes the embedder explicitly when the embedder is not used in
      # a context.
      embedder.close()
  
imports: import enum
  import os
  from unittest import mock
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from mediapipe.python._framework_bindings import image
  from mediapipe.tasks.python.components.containers import embedding_result
  from mediapipe.tasks.python.components.containers import rect
  from mediapipe.tasks.python.core import base_options
  from mediapipe.tasks.python.test import test_utils
  from mediapipe.tasks.python.vision import image_embedder
  from mediapipe.tasks.python.vision.core import image_processing_options
  from mediapipe.tasks.python.vision.core import vision_task_running_mode
label_desc: Use image node_id 9 for calling the ImageEmbedderTest obj's underlying member method code with example usage: obj.test_embed(l2_normalize, quantize, with_roi, model_file_type, expected_similarity, expected_size, expected_first_values) without return types