code: def device(device_id):
      if device_id is None or device_id < 0:
          yield
      else:  # pragma: no cover
          with cp.cuda.Device(device_id) as dev:
              yield dev
  
file_path: mars/mars/tensor/array_utils.py
imports: from collections import defaultdict
  from contextlib import contextmanager
  import numpy
  from ..lib import sparse
  from ..lib.sparse.core import issparse, get_dense_module
  from ..utils import lazy_import
label_desc: Use image node_id 13 for calling a global function with example usage: device(device_id) without return types