code: def pytest_sessionfinish(
      session: Session, exitstatus: ExitCode
  ) -> None:
      """Clean up any child processes"""
      proc = psutil.Process()
      kill_signal = signal.SIGTERM
      for child in proc.children(recursive=True):
          # https://stackoverflow.com/questions/57336095/access-verbosity-level-in-a-pytest-helper-function
          if session.config.getoption("verbose") > 0:
              print(child, child.cmdline())
  
          # https://psutil.readthedocs.io/en/latest/#kill-process-tree
          try:
              child.send_signal(kill_signal)
          except psutil.NoSuchProcess:
              pass
  
file_path: auto-sklearn/test/conftest.py
imports: from typing import Any, Iterator, List, Optional
  import re
  import shutil
  import signal
  from pathlib import Path
  import psutil
  import pytest
  from pytest import ExitCode, Item, Session
label_desc: Use image node_id 7 for calling a global function with example usage: pytest_sessionfinish(session, exitstatus) without return types