code: def check_device(a, device=None):
      if device is None:
          device = chainerx.get_default_device()
      elif isinstance(device, str):
          device = chainerx.get_device(device)
      assert a.device is device
  
file_path: chainer/tests/chainerx_tests/array_utils.py
imports: import functools
  import operator
  import numpy
  import chainerx
label_desc: Use image node_id 5 for calling a global function with example usage: check_device(a, device) without return types