code: def pytest_runtest_teardown(item, nextitem):
      if getattr(item.cls, "reuse_dist_env", False) and not nextitem:
          dist_test_class = item.cls()
          for num_procs, pool in dist_test_class._pool_cache.items():
              dist_test_class._close_pool(pool, num_procs, force=True)
  
file_path: deepspeed/tests/conftest.py
imports: import sys
  import pytest
  import os
  from os.path import abspath, dirname, join
  import torch
  import warnings
label_desc: Use image node_id 6 for calling a global function with example usage: pytest_runtest_teardown(item, nextitem) without return types