code: def test_ucx_config_w_env_var(ucx_loop, cleanup, loop):
      env = os.environ.copy()
      env["DASK_DISTRIBUTED__RMM__POOL_SIZE"] = "1000.00 MB"
  
      port = str(open_port())
      # Using localhost appears to be less flaky than {HOST}. Additionally, this is
      # closer to how other dask worker tests are written.
      sched_addr = f"ucx://127.0.0.1:{port}"
  
      with popen(
          [
              "dask",
              "scheduler",
              "--no-dashboard",
              "--protocol",
              "ucx",
              "--port",
              port,
          ],
          env=env,
      ):
          with popen(
              [
                  "dask",
                  "worker",
                  sched_addr,
                  "--host",
                  "127.0.0.1",
                  "--no-dashboard",
                  "--protocol",
                  "ucx",
                  "--no-nanny",
              ],
              env=env,
          ):
              with Client(sched_addr, loop=loop, timeout=30) as c:
                  while not c.scheduler_info()["workers"]:
                      sleep(0.1)
  
                  # Check for RMM pool resource type
                  rmm_resource = c.run_on_scheduler(
                      rmm.mr.get_current_device_resource_type
                  )
                  assert rmm_resource == rmm.mr.PoolMemoryResource
  
                  rmm_resource_workers = c.run(
                      rmm.mr.get_current_device_resource_type
                  )
                  for v in rmm_resource_workers.values():
                      assert v == rmm.mr.PoolMemoryResource
  
file_path: distributed/distributed/comm/tests/test_ucx_config.py
imports: from __future__ import annotations
  import os
  from time import sleep
  import pytest
  import dask
  from distributed import Client
  from distributed.comm.ucx import _prepare_ucx_config
  from distributed.utils import get_ip, open_port
  from distributed.utils_test import gen_test, popen
label_desc: Use image node_id 1 for calling a global function with example usage: test_ucx_config_w_env_var(ucx_loop, cleanup, loop) without return types