code: def wait_impl(self, cpid, *, exitcode):
      # This many iterations can be required, since some previously run
      # tests (e.g. test_ctypes) could have spawned a lot of children
      # very quickly.
      for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
          # wait3() shouldn't hang, but some of the buildbots seem to hang
          # in the forking tests.  This is an attempt to fix the problem.
          spid, status, rusage = os.wait3(os.WNOHANG)
          if spid == cpid:
              break
  
      self.assertEqual(spid, cpid)
      self.assertEqual(os.waitstatus_to_exitcode(status), exitcode)
      self.assertTrue(rusage)
  
file_path: cpython/Lib/test/test_wait3.py
imports: import os
  import subprocess
  import sys
  import unittest
  from test.fork_wait import ForkWait
  from test import support
label_desc: Use image node_id 1 for calling the Wait3Test obj's underlying member method code with example usage: obj.wait_impl(cpid) without return types