code: def _write_ipengine_pid(profile):
      engine_pids = _get_ipengine_pid(profile)
      path = _get_ip_file_dir(profile)
      with open(os.path.join(path, "engine_pids.json"), "w+") as f:
          json.dump(engine_pids, f)
  
imports: import argparse
  import json
  import os
  import multiprocessing
  import signal
  import subprocess
  import time
  from typing import Dict, List
  import ipyparallel
  import bluefog
  from bluefog.run import env_util, network_util, horovod_driver
label_desc: Use image node_id 9 for calling a global function with example usage: _write_ipengine_pid(profile) without return types