code: def current_context():
      """This function has been deprecated. Please refer to ``device.current_device``."""
      warn(
          "Directly use current_context to get current device will be deprecated. "
          "Please use current_device method instead. ",
          DeprecationWarning,
      )
      return _current.get()
  
imports: from warnings import warn
  from .device import Device, _current, cpu, gpu, cpu_pinned
  from .device import num_gpus, gpu_memory_info
label_desc: Use image node_id 2 for calling a global function with example usage: current_context() and returns: _current