code: def save_state(x, steps_completed, trial_id, checkpoint_directory):
      with checkpoint_directory.joinpath("state").open("w") as f:
          f.write(f"{x},{steps_completed},{trial_id}")
  
file_path: determined/examples/tutorials/core_api/3_hpsearch.py
imports: import logging
  import pathlib
  import sys
  import time
  import determined
label_desc: Use image node_id 1 for calling a global function with example usage: save_state(x, steps_completed, trial_id, checkpoint_directory) without return types