code: def _parent_process(child_pipe):
      """Simulate starting an AsyncProcess and then dying.
  
      The child_alive pipe is held open for as long as the child is alive, and can
      be used to determine if it exited correctly."""
  
      async def parent_process_coroutine():
          IOLoop.current()
          worker_ready = get_mp_context().Event()
  
          worker = AsyncProcess(
              target=_worker_process, args=(worker_ready, child_pipe)
          )
  
          await worker.start()
  
          # Wait for the child process to have started.
          worker_ready.wait()
  
          # Exit immediately, without doing any process teardown (including atexit
          # and 'finally:' blocks) as if by SIGKILL. This should cause
          # worker_process to also exit.
          os._exit(255)
  
      async def run_with_timeout():
          t = asyncio.create_task(parent_process_coroutine())
          return await wait_for(t, timeout=10)
  
      asyncio_run(run_with_timeout(), loop_factory=get_loop_factory())
      raise RuntimeError("this should be unreachable due to os._exit")
  
imports: from __future__ import annotations
  import asyncio
  import gc
  import os
  import signal
  import sys
  import threading
  import weakref
  from time import sleep
  import psutil
  import pytest
  from tornado.ioloop import IOLoop
  from distributed.compatibility import LINUX, MACOS, WINDOWS, asyncio_run
  from distributed.config import get_loop_factory
  from distributed.metrics import time
  from distributed.process import AsyncProcess
  from distributed.utils import get_mp_context, wait_for
  from distributed.utils_test import gen_test, nodebug
label_desc: Use image node_id 10 for calling a global function with example usage: _parent_process(child_pipe) and returns: unknown