code: def parameterized_custom_name_func(func, param_num, param):
      # customize the test name generator function as we want both params to appear in the sub-test
      # name, as by default it shows only the first param
      param_based_name = parameterized.to_safe_name(
          "_".join(str(x) for x in param.args)
      )
      return f"{func.__name__}_{param_based_name}"
  
imports: import dataclasses
  import io
  import itertools
  import json
  import os
  import unittest
  from copy import deepcopy
  import datasets
  from parameterized import parameterized
  from tests.trainer.test_trainer import TrainerIntegrationCommon
  from transformers import AutoModel, TrainingArguments, is_torch_available, logging
  from transformers.deepspeed import HfDeepSpeedConfig, is_deepspeed_available, unset_hf_deepspeed_config
  from transformers.testing_utils import CaptureLogger, CaptureStd, CaptureStderr, LoggingLevel, TestCasePlus, execute_subprocess_async, get_gpu_count, mockenv_context, require_deepspeed, require_optuna, require_torch_gpu, require_torch_multi_gpu, slow
  from transformers.trainer_utils import get_last_checkpoint, set_seed
  from transformers.utils import WEIGHTS_NAME, is_torch_bf16_gpu_available
label_desc: Use image node_id 5 for calling a global function with example usage: parameterized_custom_name_func(func, param_num, param) and returns: func, str, param_based_name