old_contents: import numpy
  
  import chainer
  from chainer.backends import cuda
  from chainer.backends import intel64
  
  
  def _contains_nan(x):
      """Returns whether the input array has NaN values.
  
      Args:
          x (numpy.ndarray or cupy.ndarray): Array to be checked.
  
      Returns:
          bool: True if the input has NaN values.
  
      """
      if x.dtype.kind in ('f', 'c'):
          with cuda.get_device_from_array(x):
              return get_array_module(x).isnan(x).any()
      else:
          return False
  
  
  def copyto(dst, src):
      """Copies the elements of an ndarray to those of another one.
  
      This function can copy the CPU/GPU arrays to the destination arrays on
      another device.
  
      Args:
          dst (`numpy.ndarray`, `cupy.ndarray` or `ideep4py.mdarray`):
              Destination array.
          src (`numpy.ndarray`, `cupy.ndarray` or `ideep4py.mdarray`):
              Source array.
  
      """
      if isinstance(dst, numpy.ndarray):
          numpy.copyto(dst, numpy.asarray(cuda.to_cpu(src)))
      elif isinstance(dst, intel64.mdarray):
          intel64.ideep.basic_copyto(dst, cuda.to_cpu(src))
      elif isinstance(dst, cuda.ndarray):
          if isinstance(src, chainer.get_cpu_array_types()):
              src = numpy.asarray(src)
              if dst.flags.c_contiguous or dst.flags.f_contiguous:
                  dst.set(src)
              else:
                  cuda.cupy.copyto(dst, cuda.to_gpu(src, device=dst.device))
          elif isinstance(src, cuda.ndarray):
              cuda.cupy.copyto(dst, src)
          else:
              raise TypeError('cannot copy from non-array object of type {}'
                              .format(type(src)))
      else:
          raise TypeError('cannot copy to non-array object of type {}'.format(
              type(dst)))
  
new_contents: import numpy
  
  import chainer
  from chainer.backends import cuda
  from chainer.backends import intel64
  
  
  def _contains_nan(x):
      """Returns whether the input array has NaN values.
  
      Args:
          x (numpy.ndarray or cupy.ndarray): Array to be checked.
  
      Returns:
          bool: True if the input has NaN values.
  
      """
      if x.dtype.kind in ('f', 'c'):
          with cuda.get_device_from_array(x):
              return chainer.backend.get_array_module(x).isnan(x).any()
      else:
          return False
  
  
  def copyto(dst, src):
      """Copies the elements of an ndarray to those of another one.
  
      This function can copy the CPU/GPU arrays to the destination arrays on
      another device.
  
      Args:
          dst (`numpy.ndarray`, `cupy.ndarray` or `ideep4py.mdarray`):
              Destination array.
          src (`numpy.ndarray`, `cupy.ndarray` or `ideep4py.mdarray`):
              Source array.
  
      """
      if isinstance(dst, numpy.ndarray):
          numpy.copyto(dst, numpy.asarray(cuda.to_cpu(src)))
      elif isinstance(dst, intel64.mdarray):
          intel64.ideep.basic_copyto(dst, cuda.to_cpu(src))
      elif isinstance(dst, cuda.ndarray):
          if isinstance(src, chainer.get_cpu_array_types()):
              src = numpy.asarray(src)
              if dst.flags.c_contiguous or dst.flags.f_contiguous:
                  dst.set(src)
              else:
                  cuda.cupy.copyto(dst, cuda.to_gpu(src, device=dst.device))
          elif isinstance(src, cuda.ndarray):
              cuda.cupy.copyto(dst, src)
          else:
              raise TypeError('cannot copy from non-array object of type {}'
                              .format(type(src)))
      else:
          raise TypeError('cannot copy to non-array object of type {}'.format(
              type(dst)))
  
subject: Fix wrong module path