code: def upscale_float_image(img, as_uint16):
      if as_uint16:
          return np.asarray((img * 65535), np.uint16)
  
      return np.asarray((img * 255), np.uint8)
  
file_path: nnabla/python/src/nnabla/utils/image_utils/backend_events/common.py
imports: from __future__ import division, absolute_import
  import numpy
  from nnabla.logger import logger
label_desc: Use image node_id 4 for calling a global function with example usage: upscale_float_image(img, as_uint16) and returns: np, np