code: def test_matcher_realtime_inference(
      dataset_name,
      query,
      response,
      problem_type,
      text_backbone,
      image_backbone,
      is_ranking,
      symmetric,
  ):
      dataset = ALL_DATASETS[dataset_name]()
  
      matcher = MultiModalPredictor(
          query=query,
          response=response,
          problem_type=problem_type,
          label=dataset.label_columns[0]
          if dataset.label_columns
          else None,
          match_label=dataset.match_label,
          eval_metric=dataset.metric,
      )
  
      hyperparameters = {
          "optimization.max_epochs": 1,
          "env.num_workers": 0,
          "env.num_workers_evaluation": 0,
          "optimization.top_k_average_method": "greedy_soup",
      }
  
      if text_backbone is not None:
          hyperparameters.update(
              {
                  "model.hf_text.checkpoint_name": text_backbone,
              }
          )
      if image_backbone is not None:
          hyperparameters.update(
              {
                  "model.timm_image.checkpoint_name": image_backbone,
              }
          )
  
      save_path = os.path.join(get_home_dir(), "outputs", dataset_name)
      if os.path.exists(save_path):
          shutil.rmtree(save_path)
  
      matcher.fit(
          train_data=dataset.train_df,
          tuning_data=dataset.val_df
          if hasattr(dataset, "val_df")
          else None,
          hyperparameters=hyperparameters,
          time_limit=20,
          save_path=save_path,
      )
  
      verify_matcher_realtime_inference(matcher, dataset.test_df)
  
file_path: autogluon/multimodal/tests/unittests/others/test_matcher.py
imports: import copy
  import os
  import pickle
  import shutil
  import tempfile
  import numpy.testing
  import pytest
  from autogluon.multimodal import MultiModalPredictor
  from autogluon.multimodal.constants import BINARY, MULTICLASS, QUERY, RESPONSE, UNIFORM_SOUP
  from autogluon.multimodal.utils import convert_data_for_ranking, semantic_search
  from ..utils.unittest_datasets import Flickr30kDataset, IDChangeDetectionDataset
  from ..utils.utils import get_home_dir
label_desc: Use image node_id 4 for calling a global function with example usage: test_matcher_realtime_inference(dataset_name, query, response, problem_type, text_backbone, image_backbone, is_ranking, symmetric) without return types