code: def force_type(dtype, value):
      if numpy.isscalar(value):
          return dtype.type(value)
      elif value.dtype != dtype:
          return value.astype(dtype, copy=False)
      else:
          return value
  
imports: import collections
  import contextlib
  import shutil
  import sys
  import tempfile
  import numpy
  import six
  import chainer
  from chainer.utils.array import size_of_shape
  from chainer.utils.array import sum_to
  from chainer.utils.conv import get_conv_outsize
  from chainer.utils.conv import get_deconv_outsize
  from chainer.utils.error import _format_array_props
  from chainer.utils.experimental import experimental
  from chainer.utils.meta import enable_final
  from chainer.utils.meta import final
  from chainer.utils.nondeterministic import nondeterministic
  from chainer.utils.sparse import CooMatrix
  from chainer.utils.sparse import get_order
  from chainer.utils.sparse import to_coo
label_desc: Use image node_id 2 for calling a global function with example usage: force_type(dtype, value) and returns: dtype, value, value