code: def model_fn(model_dir):
      """
      Deserialize and return fitted model.
      """
      with load_run(
          experiment_name=os.environ["EXPERIMENT_NAME"],
          run_name=os.environ["RUN_NAME"],
          sagemaker_session=sagemaker_session,
      ) as run:
          logging.info(f"Run name: {run.run_name}")
          logging.info(f"Experiment name: {run.experiment_name}")
          logging.info(
              f"Trial component name: {run._trial_component.trial_component_name}"
          )
          run.log_parameters({"p3": 3.0, "p4": 4.0})
          run.log_metric("test-job-load-log-metric", 0.1)
  
      with load_run(sagemaker_session=sagemaker_session) as run:
          run.log_parameters({"p5": 5.0, "p6": 6})
  
      model_file = "xgboost-model"
      booster = pkl.load(
          open(os.path.join(model_dir, model_file), "rb")
      )
      return booster
  
file_path: sagemaker-python-sdk/tests/data/experiment/inference.py
imports: import os
  import json
  import logging
  import pickle
  import boto3
  import numpy
  import sagemaker_xgboost_container.encoder
  from sagemaker.session import Session
  from sagemaker.experiments import load_run
label_desc: Use image node_id 2 for calling a global function with example usage: model_fn(model_dir) and returns: booster