code: def pytest_configure(config):
      # Use matplotlib agg backend during the tests including doctests
      try:
          import matplotlib
  
          matplotlib.use("agg")
      except ImportError:
          pass
  
      allowed_parallelism = joblib.cpu_count(only_physical_cores=True)
      xdist_worker_count = environ.get("PYTEST_XDIST_WORKER_COUNT")
      if xdist_worker_count is not None:
          # Set the number of OpenMP and BLAS threads based on the number of workers
          # xdist is using to prevent oversubscription.
          allowed_parallelism = max(
              allowed_parallelism // int(xdist_worker_count), 1
          )
      threadpool_limits(allowed_parallelism)
  
      # Register global_random_seed plugin if it is not already registered
      if not config.pluginmanager.hasplugin(
          "sklearn.tests.random_seed"
      ):
          config.pluginmanager.register(random_seed)
  
imports: import builtins
  import platform
  import sys
  from contextlib import suppress
  from functools import wraps
  from os import environ
  from unittest import SkipTest
  import joblib
  import numpy
  import pytest
  from _pytest.doctest import DoctestItem
  from threadpoolctl import threadpool_limits
  from sklearn import config_context, set_config
  from sklearn._min_dependencies import PYTEST_MIN_VERSION
  from sklearn.datasets import fetch_20newsgroups, fetch_20newsgroups_vectorized, fetch_california_housing, fetch_covtype, fetch_kddcup99, fetch_olivetti_faces, fetch_rcv1
  from sklearn.tests import random_seed
  from sklearn.utils import _IS_32BIT
  from sklearn.utils.fixes import np_base_version, parse_version, sp_version
label_desc: Use image node_id 7 for calling a global function with example usage: pytest_configure(config) without return types