code: def test_scheduler_address_env(loop, monkeypatch):
      port = open_port()
      monkeypatch.setenv(
          "DASK_SCHEDULER_ADDRESS", f"tcp://127.0.0.1:{port}"
      )
      # The env var is only picked up by the dask worker command
      with popen(
          ["dask", "scheduler", "--no-dashboard", "--port", str(port)]
      ):
          with popen(["dask", "worker", "--no-dashboard"]):
              with Client(
                  os.environ["DASK_SCHEDULER_ADDRESS"], loop=loop
              ) as c:
                  start = time()
                  while not c.scheduler_info()["workers"]:
                      sleep(0.1)
                      assert time() < start + 10
  
imports: from __future__ import annotations
  import asyncio
  import os
  import signal
  import subprocess
  import sys
  from multiprocessing import cpu_count
  from time import sleep
  import pytest
  from click.testing import CliRunner
  from dask.utils import tmpfile
  from distributed import Client
  from distributed.cli.dask_worker import _apportion_ports, main
  from distributed.compatibility import LINUX, WINDOWS
  from distributed.deploy.utils import nprocesses_nthreads
  from distributed.metrics import time
  from distributed.utils import open_port
  from distributed.utils_test import gen_cluster, inc, popen, requires_ipv6, wait_for_log_line
label_desc: Use image node_id 4 for calling a global function with example usage: test_scheduler_address_env(loop, monkeypatch) without return types