code: def test_statistics(manager: SpillManager):
      assert len(manager.statistics.spill_totals) == 0
  
      buf: SpillableBuffer = as_buffer(
          data=rmm.DeviceBuffer(size=10), exposed=False
      )
      buf.spill(target="cpu")
  
      if manager.statistics.level == 0:
          assert len(manager.statistics.spill_totals) == 0
          return
  
      assert len(manager.statistics.spill_totals) == 1
      nbytes, time = manager.statistics.spill_totals[("gpu", "cpu")]
      assert nbytes == buf.size
      assert time > 0
  
      buf.spill(target="gpu")
      assert len(manager.statistics.spill_totals) == 2
      nbytes, time = manager.statistics.spill_totals[("cpu", "gpu")]
      assert nbytes == buf.size
      assert time > 0
  
imports: import importlib
  import random
  import time
  import warnings
  import weakref
  from concurrent.futures import ThreadPoolExecutor
  from typing import List, Tuple
  import cupy
  import numpy
  import pandas
  import pandas.testing
  import pytest
  import rmm
  import cudf
  import cudf.core.buffer.spill_manager
  import cudf.options
  from cudf.core.abc import Serializable
  from cudf.core.buffer import Buffer, acquire_spill_lock, as_buffer, get_spill_lock
  from cudf.core.buffer.spill_manager import SpillManager, get_global_manager, get_rmm_memory_resource_stack, set_global_manager
  from cudf.core.buffer.spillable_buffer import SpillableBuffer, SpillableBufferOwner, SpillLock
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 32 for calling a global function with example usage: test_statistics(manager) without return types