code: def monitor_stdin():
      """Trigger shutdown when the parent process closes this process's stdin.
      This will occur if the :class:`fiftyone.core.service.DatabaseService`
      singleton destroyed.
  
      This should only occur when the parent process has exited.
      """
      while len(sys.stdin.read(1024)):
          pass
      if args.multi:
          client_monitor.notify_parent_exit()
      else:
          trigger_exit(ExitMode.PARENT)
  
imports: import argparse
  import collections
  import enum
  import os
  import signal
  import subprocess
  import sys
  import threading
  import traceback
  import psutil
  from fiftyone.service.ipc import IPCServer
label_desc: Use image node_id 3 for calling a global function with example usage: monitor_stdin() without return types