code: def term_mp(sig_num, frame):
      """kill all child processes"""
      pid = os.getpid()
      pgid = os.getpgid(os.getpid())
      print(
          "main proc {} exit, kill process group "
          "{}".format(pid, pgid)
      )
      os.killpg(pgid, signal.SIGKILL)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import sys
  import numpy
  import skimage
  import paddle
  import signal
  import random
  import copy
  from paddle.io import Dataset, DataLoader, BatchSampler, DistributedBatchSampler
  import paddle.distributed
  from ppocr.data.imaug import transform, create_operators
  from ppocr.data.simple_dataset import SimpleDataSet, MultiScaleDataSet
  from ppocr.data.lmdb_dataset import LMDBDataSet, LMDBDataSetSR, LMDBDataSetTableMaster
  from ppocr.data.pgnet_dataset import PGDataSet
  from ppocr.data.pubtab_dataset import PubTabDataSet
  from ppocr.data.multi_scale_sampler import MultiScaleSampler
label_desc: Use image node_id 1 for calling a global function with example usage: term_mp(sig_num, frame) without return types