code: def _clean_stale_servers():
      # pylint: disable=anomalous-backslash-in-string
      cmd = """ps aux | awk "/{}/ && !/ssh/ && ! /{}/ && ! /{}/" | awk "{{print \$2}}" | xargs kill -9"""  # noqa: W605
      # Processes of | the local stale servers && excluding the current starter's pid && ppid | keep pids | kill them
      cmd = cmd.format(
          os.path.splitext(os.path.basename(__file__))[0],
          os.getpid(),
          os.getppid(),
      )
      local_cmd = "bash -c '{}'".format(cmd)
      logging.debug(">>> {}".format(local_cmd))
      try:
          output = subprocess.check_output(
              local_cmd, shell=True, stderr=subprocess.STDOUT
          )
          logging.debug(">>> {}".format(output.decode("utf-8")))
      except subprocess.CalledProcessError as e:
          if e.returncode != 123:  # No stale process to kill
              raise
  
file_path: autodist/autodist/utils/server_starter.py
imports: import argparse
  import json
  import os
  import subprocess
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.training.server_lib import ClusterSpec, Server
  from autodist.const import DEFAULT_WORKING_DIR, DEFAULT_GROUP_LEADER
  from autodist.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: _clean_stale_servers() without return types