def current(self):
        """Returns the active device or None if there's no active device
        """
        with driver.get_active_context() as ac:
            devnum = ac.devnum
            if devnum is not None:
                return self[devnum]
Returns the active device or None if there's no active device
        
numba/cuda/cudadrv/devices.py