code: def write_tiff(data: np.ndarray, filename: PathLike):
      """Save data as as tif image (which natively supports float values)."""
      assert data.ndim == 3, data.shape
      assert data.shape[2] in [
          1,
          3,
          4,
      ], "Must be grayscale, RGB, or RGBA"
  
      img_as_bytes = imageio.imwrite("<bytes>", data, format="tiff")
      filename = as_path(filename)
      filename.write_bytes(img_as_bytes)
  
imports: import dataclasses
  import json
  import logging
  import imageio
  import numpy
  import png
  import tensorflow
  import tensorflow_datasets.public_api
  from typing import List, Dict, Union
label_desc: Use image node_id 14 for calling a global function with example usage: write_tiff(data, filename) without return types