code: def pytest_runtest_setup(item):
      fname = item.fspath.strpath
      # normalize filename to use forward slashes on Windows for easier handling
      # later
      fname = fname.replace(os.sep, "/")
  
      is_index = fname.endswith("datasets/index.rst")
      if fname.endswith("datasets/labeled_faces.rst") or is_index:
          setup_labeled_faces()
      elif fname.endswith("datasets/rcv1.rst") or is_index:
          setup_rcv1()
      elif fname.endswith("datasets/twenty_newsgroups.rst") or is_index:
          setup_twenty_newsgroups()
      elif (
          fname.endswith(
              "tutorial/text_analytics/working_with_text_data.rst"
          )
          or is_index
      ):
          setup_working_with_text_data()
      elif fname.endswith("modules/compose.rst") or is_index:
          setup_compose()
      elif fname.endswith("datasets/loading_other_datasets.rst"):
          setup_loading_other_datasets()
      elif fname.endswith("modules/impute.rst"):
          setup_impute()
      elif fname.endswith("modules/grid_search.rst"):
          setup_grid_search()
      elif fname.endswith("modules/preprocessing.rst"):
          setup_preprocessing()
      elif fname.endswith(
          "statistical_inference/unsupervised_learning.rst"
      ):
          setup_unsupervised_learning()
  
      rst_files_requiring_matplotlib = [
          "modules/partial_dependence.rst",
          "modules/tree.rst",
          "tutorial/statistical_inference/settings.rst",
          "tutorial/statistical_inference/supervised_learning.rst",
      ]
      for each in rst_files_requiring_matplotlib:
          if fname.endswith(each):
              skip_if_matplotlib_not_installed(fname)
  
      if fname.endswith("array_api.rst"):
          skip_if_cupy_not_installed(fname)
  
imports: import os
  import warnings
  from os import environ
  from os.path import exists, join
  import pytest
  from _pytest.doctest import DoctestItem
  from sklearn.datasets import get_data_home
  from sklearn.datasets._base import _pkl_filepath
  from sklearn.datasets._twenty_newsgroups import CACHE_NAME
  from sklearn.utils import IS_PYPY
  from sklearn.utils._testing import SkipTest, check_skip_network
  from sklearn.utils.fixes import np_base_version, parse_version
label_desc: Use image node_id 13 for calling a global function with example usage: pytest_runtest_setup(item) without return types