code: def test_infer_metrics_custom(
      problem_type,
      eval_metric,
      is_matching,
      target_eval_metric_name,
      target_validation_metric_name,
  ):
      validation_metric_name, eval_metric_name = infer_metrics(
          problem_type, eval_metric, None, is_matching
      )
      assert eval_metric_name == target_eval_metric_name
      assert validation_metric_name == target_validation_metric_name
  
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 5 for calling a global function with example usage: test_infer_metrics_custom(problem_type, eval_metric, is_matching, target_eval_metric_name, target_validation_metric_name) without return types