code: def test_child_failed_error(self):
      pf0 = self.failure_with_error_file(
          exception=SentinelError("rank 0")
      )
      pf1 = self.failure_with_error_file(
          exception=SentinelError("rank 1")
      )
      pf2 = self.failure_without_error_file(exitcode=138)
      ex = ChildFailedError("trainer.par", {0: pf0, 1: pf1, 2: pf2})
      self.assertEqual(pf0, ex.get_first_failure()[1])
      # print is intentional and should prints something like this:
      """
          *********************************************
                trainer.par FAILED
          =============================================
          Root Cause:
          [0]:
            time: 2020-11-25_21:22:31
            rank: 0 (local_rank: 0)
            exitcode: 1 (pid: 997)
            error_file: /tmp/ApiTesttbb37ier/error.json
            traceback: "SentinelError: rank 0"
          =============================================
          Other Failures:
          [1]:
            time: 2020-11-25_21:22:31
            rank: 1 (local_rank: 0)
            exitcode: 1 (pid: 997)
            error_file: /tmp/ApiTesttbb37ier/error.json
            msg: "SentinelError: rank 1"
          [2]:
            time: 2020-11-25_21:22:31
            rank: 2 (local_rank: 0)
            exitcode: 138 (pid: 997)
            error_file: <N/A>
            traceback: To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
          *********************************************
          """
      print(ex)
  
imports: import json
  import os
  import shutil
  import signal
  import tempfile
  import unittest
  from unittest import mock
  from torch.distributed.elastic.multiprocessing.errors import ChildFailedError, ProcessFailure, record
  from torch.distributed.elastic.multiprocessing.errors.error_handler import ErrorHandler
label_desc: Use image node_id 11 for calling the ApiTest obj's underlying member method code with example usage: obj.test_child_failed_error() without return types