code: def _pack_parameter(
      parameter_id,
      params,
      customized=False,
      trial_job_id=None,
      parameter_index=None,
  ):
      _trial_params[parameter_id] = params
      ret = {
          "parameter_id": parameter_id,
          "parameter_source": "customized"
          if customized
          else "algorithm",
          "parameters": params,
      }
      if trial_job_id is not None:
          ret["trial_job_id"] = trial_job_id
      if parameter_index is not None:
          ret["parameter_index"] = parameter_index
      else:
          ret["parameter_index"] = 0
      return dump(ret)
  
imports: import logging
  from collections import defaultdict
  from nni import NoMoreTrialError
  from nni.assessor import AssessResult
  from .common import multi_phase_enabled
  from .env_vars import dispatcher_env_vars
  from .msg_dispatcher_base import MsgDispatcherBase
  from .tuner_command_channel import CommandType
  from ..common.serializer import dump, load
  from ..utils import MetricType
label_desc: Use image node_id 3 for calling a global function with example usage: _pack_parameter(parameter_id, params, customized, trial_job_id, parameter_index) and returns: dump