code: def assert_no_leak():
      gc.collect()
      core_worker = ray._private.worker.global_worker.core_worker
      ref_counts = core_worker.get_all_reference_counts()
      for rc in ref_counts.values():
          assert rc["local"] == 0
          assert rc["submitted"] == 0
  
imports: import pytest
  import numpy
  import sys
  import time
  import gc
  from unittest.mock import Mock
  import ray
  from ray.util.client.ray_client_helpers import ray_start_client_server_for_address
  from ray._private.client_mode_hook import enable_client_mode
  from ray.tests.conftest import call_ray_start_context
label_desc: Use image node_id 1 for calling a global function with example usage: assert_no_leak() without return types