code: def s3_config(
      num_trials: int,
      secrets: Dict[str, str],
      prefix: Optional[str] = None,
  ) -> str:
      config_dict = {
          "description": "noop_random",
          "checkpoint_storage": {
              "type": "s3",
              "access_key": secrets["INTEGRATIONS_S3_ACCESS_KEY"],
              "secret_key": secrets["INTEGRATIONS_S3_SECRET_KEY"],
              "bucket": secrets["INTEGRATIONS_S3_BUCKET"],
          },
          "hyperparameters": {"global_batch_size": 1},
          "searcher": {
              "metric": "validation_error",
              "smaller_is_better": True,
              "name": "random",
              "max_trials": num_trials,
              "max_length": {"batches": 100},
          },
          "entrypoint": "model_def:NoOpTrial",
      }
      if prefix is not None:
          config_dict["checkpoint_storage"]["prefix"] = prefix  # type: ignore
  
      return str(util.yaml_safe_dump(config_dict))
  
file_path: determined/e2e_tests/tests/command/test_tensorboard.py
imports: import pathlib
  import subprocess
  from typing import Dict, Optional
  import pytest
  from determined.common import api, util
  from tests import command
  from tests import config
  from tests import experiment
  from tests.api_utils import determined_test_session
  from tests.filetree import FileTree
label_desc: Use image node_id 2 for calling a global function with example usage: s3_config(num_trials, secrets, prefix) and returns: str