code: def hpo_trial(
      sampled_hyperparameters, learner, checkpoint_dir=None, **_fit_args
  ):
      """
      Run one HPO trial.
  
      Parameters
      ----------
      sampled_hyperparameters
          The sampled hyperparameters for this trial.
      learner
          A learner object.
      checkpoint_dir
          The checkpoint directory.
      _fit_args
          The keyword arguments for learner.fit_per_run().
      """
      from ray import tune
  
      resources = tune.get_trial_resources().required_resources
      num_cpus = int(resources.get("CPU"))
  
      _fit_args[
          "hyperparameters"
      ] = sampled_hyperparameters  # The original hyperparameters is the search space, replace it with the hyperparameters sampled
      _fit_args[
          "save_path"
      ] = (
          tune.get_trial_dir()
      )  # We want to save each trial to a separate directory
      logger.debug(f"hpo trial save_path: {_fit_args['save_path']}")
      if checkpoint_dir is not None:
          _fit_args["resume"] = True
          _fit_args["ckpt_path"] = os.path.join(
              checkpoint_dir, RAY_TUNE_CHECKPOINT
          )
      with set_torch_num_threads(num_cpus=num_cpus):
          learner.fit_per_run(**_fit_args)
  
file_path: autogluon/multimodal/src/autogluon/multimodal/utils/hpo.py
imports: import logging
  import os
  import shutil
  import lightning.pytorch
  import yaml
  from autogluon.common.utils.context import set_torch_num_threads
  from ..constants import BEST_K_MODELS_FILE, RAY_TUNE_CHECKPOINT
  from .matcher import create_siamese_model
  from .model import create_fusion_model
label_desc: Use image node_id 2 for calling a global function with example usage: hpo_trial(sampled_hyperparameters, learner, checkpoint_dir) without return types