code: def pytest_sessionstart():
      """Global initialization of multiprocessing pool.
  
      Runs before any test.
  
      """
      if not USE_PYTEST_POOL:
          return
      pool = Pool(processes=NUM_PROCESSES)
      pool.starmap(
          setup_ddp,
          [(rank, NUM_PROCESSES) for rank in range(NUM_PROCESSES)],
      )
      pytest.pool = pool
  
file_path: torchmetrics/tests/unittests/conftest.py
imports: import contextlib
  import os
  import sys
  from functools import wraps
  from typing import Any, Callable, Optional
  import pytest
  import torch
  from torch.multiprocessing import Pool, set_sharing_strategy, set_start_method
label_desc: Use image node_id 2 for calling a global function with example usage: pytest_sessionstart() without return types