code: def gen_blockable_cluster(test_func):
      """Generate a cluster with 1 worker and disabled memory monitor,
      to be used together with ``async with block_worker(...):``.
      """
      return pytest.mark.parametrize(
          "pause",
          [
              pytest.param(False, id="queue on worker"),
              pytest.param(True, id="queue on scheduler"),
          ],
      )(
          gen_cluster(
              client=True,
              nthreads=[("", 1)],
              config={"distributed.worker.memory.pause": False},
          )(test_func)
      )
  
file_path: distributed/distributed/tests/test_priorities.py
imports: from __future__ import annotations
  import asyncio
  from collections.abc import AsyncIterator
  from contextlib import asynccontextmanager
  import pytest
  import dask
  from dask import delayed
  from distributed import Client, Event, Scheduler, Status, Worker, wait
  from distributed.utils_test import gen_cluster, inc, slowinc
label_desc: Use image node_id 1 for calling a global function with example usage: gen_blockable_cluster(test_func) and returns: pytest