code: def _hyperparameters(horovod=False, smdataparallel=False):
      hps = {
          "sagemaker_program": json.dumps("dummy_script.py"),
          "sagemaker_submit_directory": json.dumps(
              "s3://{}/{}/source/sourcedir.tar.gz".format(
                  BUCKET_NAME, JOB_NAME
              )
          ),
          "sagemaker_container_log_level": str(logging.INFO),
          "sagemaker_job_name": json.dumps(JOB_NAME),
          "sagemaker_region": json.dumps("us-west-2"),
      }
  
      if horovod or smdataparallel:
          hps["model_dir"] = json.dumps("/opt/ml/model")
      else:
          hps["model_dir"] = json.dumps(
              "s3://{}/{}/model".format(BUCKET_NAME, JOB_NAME)
          )
  
      return hps
  
imports: from __future__ import absolute_import
  import json
  import logging
  import os
  from mock import patch, Mock, MagicMock
  from packaging import version
  import pytest
  from sagemaker.estimator import _TrainingJob
  from sagemaker.session_settings import SessionSettings
  from sagemaker.tensorflow import TensorFlow
  from sagemaker.instance_group import InstanceGroup
  from sagemaker.workflow.parameters import ParameterString, ParameterBoolean
  from tests.unit import DATA_DIR
label_desc: Use image node_id 3 for calling a global function with example usage: _hyperparameters(horovod, smdataparallel) and returns: hps