code: def test_loop_started_in_constructor(cleanup):
      # test that SpecCluster.__init__ starts a loop in another thread
      cluster = SpecCluster(worker_spec, scheduler=scheduler, loop=None)
      try:
          assert cluster.loop.asyncio_loop.is_running()
      finally:
          with cluster:
              pass
  
imports: from __future__ import annotations
  import asyncio
  import re
  import warnings
  from time import sleep
  import pytest
  import tlz
  import dask
  from dask.distributed import Client, Nanny, Scheduler, SpecCluster, Worker
  from distributed.compatibility import WINDOWS
  from distributed.core import Status
  from distributed.deploy.spec import ProcessInterface, close_clusters, run_spec
  from distributed.metrics import time
  from distributed.utils import is_valid_xml
  from distributed.utils_test import gen_cluster, gen_test
label_desc: Use image node_id 2 for calling a global function with example usage: test_loop_started_in_constructor(cleanup) without return types