code: def test_video_text_single_tower_clip_encoder(
      self,
      fusion_type,
      text_input_type,
      projection_size,
      head_type,
      task,
      expected_keys,
  ):
      rngs = {"params": random.PRNGKey(0), "dropout": random.PRNGKey(1)}
      config = copy.deepcopy(model._DEFAULT_UNLOC_CONFIG)
      config.model.classifier = "token"
      config.model.num_classes = (
          1 if task == "highlight_detection" else 10
      )
      config.model.text_tower_config = self.clip_text_tower_config
      config.model.text_tower_config.projection_size = projection_size
      config.model.text_tower_config.input_type = text_input_type
      config.model.video_tower_config = self.clip_video_tower_config
      config.model.video_tower_config.modality_configs[
          "rgb"
      ].projection_size = projection_size
      config.model.video_text_fusion_config.type = fusion_type
      config.model.head_config.get(task).type = head_type
  
      if fusion_type == "video_text_emb_self_attention":
          self.inputs["class_names"] = self.text_emb_inputs
          self.inputs["caption"] = self.caption_emb_inputs
          config.model.text_tower_config = (
              self.pass_through_encoder_config
          )
          config.model.video_text_fusion_config.config = (
              self.video_textemb_fusion_encoder_config
          )
      elif fusion_type == "video_identity_text_emb":
          config.model.video_text_fusion_config.config = (
              ml_collections.ConfigDict()
          )
  
      output, params = model.VideoTextSingleTower(
          num_classes=config.model.num_classes,
          video_tower_config=config.model.video_tower_config,
          text_tower_config=config.model.text_tower_config,
          video_text_fusion_config=config.model.video_text_fusion_config,
          head_config=config.model.head_config,
          classifier=config.model.classifier,
      ).init_with_output(
          rngs, self.inputs, task=task, train=False, debug=False
      )
      if task == "moment_retrieval":
          self.assertTupleEqual(output.shape, (2, 4, 4, 3))
      elif task == "temporal_localization":
          self.assertTupleEqual(output.shape, (2, 4, 30))
      elif task == "action_segmentation":
          self.assertTupleEqual(output.shape, (2, 4, 10))
      self.assertSetEqual(set(params["params"].keys()), expected_keys)
  
file_path: scenic/scenic/projects/unloc/model_test.py
imports: import copy
  from absl.testing import parameterized
  import flax
  from jax import random
  import jax.numpy
  import ml_collections
  from scenic.projects.unloc import model
  import tensorflow
label_desc: Use image node_id 2 for calling the ModelTest obj's underlying member method code with example usage: obj.test_video_text_single_tower_clip_encoder(fusion_type, text_input_type, projection_size, head_type, task, expected_keys) without return types