code: def set_global_manager(manager: Optional[SpillManager]) -> None:
      """Set the global manager, which if None disables spilling"""
  
      global _global_manager, _global_manager_uninitialized
      if _global_manager is not None:
          gc.collect()
          buffers = _global_manager.buffers()
          if len(buffers) > 0:
              warnings.warn(f"overwriting non-empty manager: {buffers}")
  
      _global_manager = manager
      _global_manager_uninitialized = False
  
imports: from __future__ import annotations
  import gc
  import io
  import textwrap
  import threading
  import traceback
  import warnings
  import weakref
  from collections import defaultdict
  from dataclasses import dataclass
  from functools import partial
  from typing import Dict, List, Optional, Tuple
  import rmm.mr
  from cudf.core.buffer.spillable_buffer import SpillableBufferOwner
  from cudf.options import get_option
  from cudf.utils.nvtx_annotation import _cudf_nvtx_annotate
  from cudf.utils.string import format_bytes
label_desc: Use image node_id 3 for calling a global function with example usage: set_global_manager(manager) without return types