code: def test_f1_metrics_for_multiclass(eval_metric):
      dataset = PetFinderDataset()
      predictor = MultiModalPredictor(
          label=dataset.label_columns[0],
          problem_type="multiclass",
          eval_metric=eval_metric,
      )
      hyperparameters = {
          "optimization.max_epochs": 1,
          "model.names": ["ft_transformer"],
          "env.num_gpus": 1,
          "env.num_workers": 0,
          "env.num_workers_evaluation": 0,
          "optimization.top_k_average_method": "best",
          "optimization.loss_function": "auto",
          "data.categorical.convert_to_text": False,  # ensure the categorical model is used.
          "data.numerical.convert_to_text": False,  # ensure the numerical model is used.
      }
      save_path = os.path.join(get_home_dir(), "outputs", eval_metric)
  
      if os.path.exists(save_path):
          shutil.rmtree(save_path)
      predictor.fit(
          train_data=dataset.train_df,
          tuning_data=dataset.test_df,
          hyperparameters=hyperparameters,
          time_limit=20,
          save_path=save_path,
      )
      val_score = predictor._learner._best_score
      eval_score = predictor.evaluate(dataset.test_df)[eval_metric]
      assert abs(val_score - eval_score) < 1e-4
  
imports: import os
  import random
  import shutil
  import tempfile
  import pytest
  import torch
  from sklearn.metrics import f1_score, log_loss
  from torchmetrics import MeanMetric, RetrievalHitRate
  import autogluon.core.metrics
  from autogluon.multimodal import MultiModalPredictor
  from autogluon.multimodal.constants import MULTICLASS, Y_PRED, Y_TRUE
  from autogluon.multimodal.optimization.utils import compute_hit_rate, get_loss_func, get_metric
  from autogluon.multimodal.utils import compute_score, infer_metrics
  from ..utils.unittest_datasets import HatefulMeMesDataset, PetFinderDataset
  from ..utils.utils import get_home_dir
label_desc: Use image node_id 3 for calling a global function with example usage: test_f1_metrics_for_multiclass(eval_metric) without return types