code: def get_exitcodes_terminated_worker(processes):
      """Return a formatted string with the exitcodes of terminated workers.
  
      If necessary, wait (up to .25s) for the system to correctly set the
      exitcode of one terminated worker.
      """
      patience = 5
  
      # Catch the exitcode of the terminated workers. There should at least be
      # one. If not, wait a bit for the system to correctly set the exitcode of
      # the terminated worker.
      exitcodes = [
          p.exitcode
          for p in list(processes.values())
          if p.exitcode is not None
      ]
      while not exitcodes and patience > 0:
          patience -= 1
          exitcodes = [
              p.exitcode
              for p in list(processes.values())
              if p.exitcode is not None
          ]
          time.sleep(0.05)
  
      return _format_exitcodes(exitcodes)
  
file_path: catboost/contrib/python/joblib/joblib/externals/loky/backend/utils.py
imports: import os
  import sys
  import time
  import errno
  import signal
  import warnings
  import subprocess
  import traceback
label_desc: Use image node_id 8 for calling a global function with example usage: get_exitcodes_terminated_worker(processes) and returns: _format_exitcodes