code: def to_device(device, x):
      """Send an array to a given device.
  
      This method sends a given array to a given device. This method is used in
      :func:`~chainer.dataset.concat_examples`.
      You can also use this method in a custom converter method used in
      :class:`~chainer.training.Updater` and :class:`~chainer.training.Extension`
      such as :class:`~chainer.training.updaters.StandardUpdater` and
      :class:`~chainer.training.extensions.Evaluator`.
  
      See also :func:`chainer.dataset.concat_examples`.
  
      Args:
          device (None or int or device specifier): A device to which an array
              is sent. If it is a negative integer, an array is sent to CPU.
              If it is a positive integer, an array is sent to GPU with the
              given ID. If it is``None``, an array is left in the original
              device. Also, any of device specifiers described at
              :class:`~chainer.backend.DeviceId` is accepted.
          x (:ref:`ndarray`): An array to send.
  
      Returns:
          Converted array.
  
      """
      device = _get_device(device)
  
      if device is None:
          return x
      return device.send(x)
  
imports: import collections
  import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
label_desc: Use image node_id 3 for calling a global function with example usage: to_device(device, x) and returns: device, x