code: def change_current_allocator(allocator: _CUDAAllocator) -> None:
      r"""Change the currently used memory allocator to be the one provided.
  
      If the current allocator has already been used/initialized, this function will error.
  
  
      Args:
          allocator (torch.cuda.memory._CUDAAllocator): allocator to be set as the active one.
      .. note::
          See :ref:`cuda-memory-management` for details on creating and using a custom allocator
      """
      torch._C._cuda_changeCurrentAllocator(allocator.allocator())
  
imports: import collections
  import contextlib
  import ctypes
  import pickle
  import sys
  import warnings
  from inspect import signature
  from typing import Any, Dict, Optional, Tuple, Union
  import torch
  from torch import _C
  from torch.types import Device
  from .None import _get_device_index, _get_nvml_device_index, _lazy_init, is_initialized
  from ._memory_viz import memory, segments
  from ._utils import _dummy_type
label_desc: Use image node_id 32 for calling a global function with example usage: change_current_allocator(allocator) without return types