code: def cpu_pinned(device_id=0):
      """Returns a CPU pinned memory device. Copying from CPU pinned memory to GPU
      is faster than from normal CPU memory.
  
      This function is a short cut for ``Device('cpu_pinned', device_id)``.
  
      Examples
      ----------
      >>> with mx.cpu_pinned():
      ...     cpu_array = mx.np.ones((2, 3))
      >>> cpu_array.device
      cpu_pinned(0)
      >>> cpu_array = mx.np.ones((2, 3), ctx=mx.cpu_pinned())
      >>> cpu_array.device
      cpu_pinned(0)
  
      Parameters
      ----------
      device_id : int, optional
          The device id of the device. `device_id` is not needed for CPU.
          This is included to make interface compatible with GPU.
  
      Returns
      -------
      device : Device
          The corresponding CPU pinned memory device.
      """
      return Device("cpu_pinned", 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 2 for calling a global function with example usage: cpu_pinned(device_id) and returns: Device