code: def global_except_hook(exctype, value, traceback):
      """global except hook"""
      import sys
  
      try:
          import mpi4py.MPI
  
          sys.stderr.write(
              "\n*****************************************************\n"
          )
          sys.stderr.write(
              "Uncaught exception was detected on rank {}. \n".format(
                  mpi4py.MPI.COMM_WORLD.Get_rank()
              )
          )
          from traceback import print_exception
  
          print_exception(exctype, value, traceback)
          sys.stderr.write(
              "*****************************************************\n\n\n"
          )
          sys.stderr.write("\n")
          sys.stderr.write(
              "Calling MPI_Abort() to shut down MPI processes...\n"
          )
          sys.stderr.flush()
      finally:
          try:
              import mpi4py.MPI
  
              mpi4py.MPI.COMM_WORLD.Abort(1)
          except Exception as e:
              sys.stderr.write(
                  "*****************************************************\n"
              )
              sys.stderr.write(
                  "Sorry, we failed to stop MPI, this process will hang.\n"
              )
              sys.stderr.write(
                  "*****************************************************\n"
              )
              sys.stderr.flush()
              raise e
  
imports: import os
  import sys
  import json
  import time
  import math
  import shutil
  import glob
  import re
  import traceback
  import collections
  import numpy
  import pickle
  from collections import defaultdict, OrderedDict
  from datetime import datetime, timedelta
  import paddle
  import paddle.static
  import paddle.fluid
  import paddle.fluid.core
  import paddle.distributed.fleet
  from pgl.utils.logger import log
  import util_hadoop
label_desc: Use image node_id 15 for calling a global function with example usage: global_except_hook(exctype, value, traceback) without return types