code: def wait_for_subprocess(callback, timeout=3, **kwargs):
      start_time = time.time()
      while time.time() < start_time + timeout:
          matches = list(
              filter(callback, get_child_processes(**kwargs))
          )
          if matches:
              return matches[0]
          time.sleep(0.2)
      raise RuntimeError(
          "Process did not start after %f seconds" % (timeout)
      )
  
imports: from contextlib import contextmanager
  import os
  import sys
  import time
  import unittest
  import psutil
  import requests
  import retrying
  import fiftyone
  import fiftyone.constants
  import fiftyone.core.service
  import fiftyone.service.util
label_desc: Use image node_id 3 for calling a global function with example usage: wait_for_subprocess(callback, timeout) and returns: matches