code: def assert_no_thrashing(address):
      state = ray._private.state.GlobalState()
      options = GcsClientOptions.from_gcs_address(address)
      state._initialize_global_state(options)
      summary = memory_summary(address=address, stats_only=True)
      restored_bytes = 0
      consumed_bytes = 0
  
      for line in summary.split("\n"):
          if "Restored" in line:
              restored_bytes = int(line.split(" ")[1])
          if "consumed" in line:
              consumed_bytes = int(line.split(" ")[-2])
      assert (
          consumed_bytes >= restored_bytes
      ), f"consumed: {consumed_bytes}, restored: {restored_bytes}"
  
imports: import copy
  import json
  import platform
  import random
  import sys
  from datetime import datetime, timedelta
  from unittest.mock import patch
  import numpy
  import pytest
  import ray
  from ray._private.external_storage import create_url_with_offset, parse_url_with_offset, _get_unique_spill_filename, FileSystemStorage, ExternalStorageSmartOpenImpl
  from ray._private.internal_api import memory_summary
  from ray._private.test_utils import wait_for_condition
  from ray._raylet import GcsClientOptions
  from ray.tests.conftest import buffer_object_spilling_config, file_system_object_spilling_config, mock_distributed_fs_object_spilling_config
label_desc: Use image node_id 3 for calling a global function with example usage: assert_no_thrashing(address) without return types