code: def warn_user_about_slow_tests_without_parallelism(  # noqa: D
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
  ) -> None:
      worker_count_env_var = os.environ.get(
          "PYTEST_XDIST_WORKER_COUNT", "1"
      )
      try:
          num_workers = int(worker_count_env_var)
      except ValueError as e:
          raise ValueError(
              f"Could not convert environment variable PYTEST_XDIST_WORKER_COUNT to int! "
              f"Value in environ was: {worker_count_env_var}"
          ) from e
  
      num_items = len(request.session.items)
      dialect = dialect_from_url(mf_test_session_state.sql_engine_url)
  
      # If already running in parallel or if there's not many test items, no need to print the warning. Picking 10/30 as
      # the thresholds, but not much thought has been put into it.
      if num_workers > 1 or num_items < 10:
          return
  
      # Since DuckDB / Postgres is fast, use 30 as the threshold.
      if (
          dialect is SqlDialect.DUCKDB
          or dialect is SqlDialect.POSTGRESQL
      ) and num_items < 30:
          return
  
      if num_items > 10:
          warnings.warn(
              f"This test session with {dialect.name} and {num_items} item(s) is running with {num_workers} worker(s). "
              f'Consider using the pytest-xdist option "-n <number of workers>" to parallelize execution and speed '
              f"up the session."
          )
  
imports: from __future__ import annotations
  import datetime
  import logging
  import os
  import warnings
  from dataclasses import dataclass
  from pathlib import Path
  import _pytest.config
  import pytest
  import sqlalchemy.util
  from _pytest.fixtures import FixtureRequest
  from sqlalchemy.engine import make_url
  from metricflow.random_id import random_id
  from metricflow.test.fixtures.sql_clients.common_client import SqlDialect
  from metricflow.test.table_snapshot.table_snapshots import SqlTableSnapshotHash, SqlTableSnapshotRepository
label_desc: Use image node_id 7 for calling a global function with example usage: warn_user_about_slow_tests_without_parallelism(request, mf_test_session_state) without return types