code: def gpu(device_id=0):
      """Returns a GPU device.
  
      This function is a short cut for Device('gpu', device_id).
      The K GPUs on a node are typically numbered as 0,...,K-1.
  
      Examples
      ----------
      >>> cpu_array = mx.np.ones((2, 3))
      >>> cpu_array.device
      cpu(0)
      >>> with mx.gpu(1):
      ...     gpu_array = mx.np.ones((2, 3))
      >>> gpu_array.device
      gpu(1)
      >>> gpu_array = mx.np.ones((2, 3), ctx=mx.gpu(1))
      >>> gpu_array.device
      gpu(1)
  
      Parameters
      ----------
      device_id : int, optional
          The device id of the device, needed for GPU.
  
      Returns
      -------
      device : Device
          The corresponding GPU device.
      """
      return Device("gpu", device_id)
  
file_path: mxnet/python/mxnet/device.py
imports: import contextvars
  import ctypes
  from .base import _LIB
  from .base import check_call
label_desc: Use image node_id 3 for calling a global function with example usage: gpu(device_id) and returns: Device