code: def _get_intermediate_dtype(dtype):
      # Returns the dtype for intermediate calculation.
      # For float16 input, float32 is used.
      # Otherwise the same dtype as the parameter is used.
      if dtype == numpy.float16:
          return numpy.float32
      return dtype
  
imports: from __future__ import division
  import math
  import warnings
  import numpy
  import chainer
  from chainer.backends import cuda
  from chainer.backends import intel64
  from chainer import optimizer
  from chainer import types
label_desc: Use image node_id 2 for calling a global function with example usage: _get_intermediate_dtype(dtype) and returns: dtype, numpy