code: def test_cluster(loop):
      with SSHCluster(
          scheduler_addr="127.0.0.1",
          scheduler_port=7437,
          worker_addrs=["127.0.0.1", "127.0.0.1"],
      ) as c:
          with Client(c, loop=loop) as e:
              start = time()
              while len(e.ncores()) != 2:
                  sleep(0.01)
                  assert time() < start + 5
  
              c.add_worker("127.0.0.1")
  
              start = time()
              while len(e.ncores()) != 3:
                  sleep(0.01)
                  assert time() < start + 5
  
file_path: distributed/distributed/deploy/tests/test_old_ssh.py
imports: from __future__ import annotations
  from time import sleep
  import pytest
  from distributed import Client
  from distributed.deploy.old_ssh import SSHCluster
  from distributed.metrics import time
label_desc: Use image node_id 1 for calling a global function with example usage: test_cluster(loop) without return types