code: def imsave(
      path,
      img,
      channel_first=False,
      as_uint16=False,
      auto_scale=True,
      **kwargs,
  ):
      """
      Save ``img`` to the file specified by ``path``.
      As default, the shape of ``img`` has to be (height, width, channel).
  
      Args:
          path (str): Output path.
          img (numpy.ndarray):
              Input image.
              All pixel values must be positive and in the range [0, 255] of int for uint8, [0, 65535] of int for uint16 or [0, 1] for float.
              When you pass float image, you must set `auto_scale` as True (If not, exception will be raised).
              If img with negative values is passed as input, exception will be raised.
          channel_first (bool):
              If True, you can input the image whose shape is (channel, height, width). Default is False.
          as_uint16 (bool):
              If True, cast image to uint16 before save. Default is False.
          auto_scale (bool):
              Whether the range of pixel values are scaled up or not.
              The range of upscaled pixel values depends on output dtype, which is [0, 255] as uint8 and [0, 65535] as uint16.
      """
  
      best_backend = backend_manager.get_best_backend(path, "save")
      best_backend.imsave(
          path,
          img,
          channel_first=channel_first,
          as_uint16=as_uint16,
          auto_scale=auto_scale,
          **kwargs,
      )
  
file_path: nnabla/python/src/nnabla/utils/image_utils/__init__.py
imports: from __future__ import absolute_import
  import numpy
  from .backend_manager import backend_manager
  from .backend_events.common import rescale_pixel_intensity
label_desc: Use image node_id 6 for calling a global function with example usage: imsave(path, img, channel_first, as_uint16, auto_scale) without return types