code: def interrupt_hanged_processes(profile="bluefog"):
      """Send the interrupt signal to all hanged workers.
  
      Args:
          profile (str): The profile name for ipython environment, i.e.
              the --ipython-profile you specified in `ibfrun`. By default,
              this value should be 'bluefog'.
  
      Note: This function is supported under localhost mode.
      """
      engine_pids = _get_ipengine_pid_from_file(profile)
      if engine_pids is None:
          raise FileNotFoundError(
              "Cannot find pids to interrupt the engines. Note this"
              "function is supported under localhost mode only"
          )
      timeout = 0.2
  
      def send_request_to_rc(i):
          rc = ipp.Client(profile=profile)
          rc[i].apply_sync(lambda: 0)
  
      # Send an empty function to the workers. If it cannot be finished within the
      # {timeout} second, we assume the worker is hanged then send the interrupt
      # signal to it. If finished, do nothing.
      p_list = []
      for i in range(len(engine_pids)):
          p = multiprocessing.Process(
              target=send_request_to_rc, args=(i,)
          )
          p.start()
          p_list.append(p)
      for i, p in enumerate(p_list):
          p.join(timeout)
          if p.exitcode is None:
              try:
                  os.kill(engine_pids[str(i)], signal.SIGINT)
                  print(f"send signal to {engine_pids[i]}")
              except:
                  pass
  
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 14 for calling a global function with example usage: interrupt_hanged_processes(profile) without return types