code: def save_np_image(image, output_file, save_format="jpeg"):
      """Saves an image to disk.
  
      Args:
        image: 3-D numpy array of shape [image_size, image_size, 3] and dtype
            float32, with values in [0, 1].
        output_file: str, output file.
        save_format: format for saving image (eg. jpeg).
      """
      image = np.uint8(image * 255.0)
      buf = io.BytesIO()
      skimage.io.imsave(buf, np.squeeze(image, 0), format=save_format)
      buf.seek(0)
      f = tf.gfile.GFile(output_file, "w")
      f.write(buf.getvalue())
      f.close()
  
imports: import io
  import os
  import tempfile
  from magenta.models.image_stylization import imagenet_data
  import numpy
  import skimage.io
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling a global function with example usage: save_np_image(image, output_file, save_format) without return types