code: def get_random_png(height=None, width=None, channels=CHANNELS_NB):
      """Returns path to PNG picture."""
      # Big randomly generated pngs take large amounts of diskspace.
      # Instead, we resize a 4x4 random image to the png size.
      image = get_random_picture(4, 4, channels)
      if (height is not None) and (width is not None):
          image = tf.image.resize_nearest_neighbor(
              tf.expand_dims(image, 0), (height, width)
          )[0]
      png = tf.image.encode_png(image)
      with utils.nogpu_session() as sess:
          res = sess.run(png)
      fobj = tempfile.NamedTemporaryFile(
          delete=False, mode="wb", suffix=".PNG"
      )
      fobj.write(res)
      fobj.close()
      return fobj.name
  
file_path: datasets/tensorflow_datasets/testing/fake_data_utils.py
imports: import random
  import tempfile
  import numpy
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: get_random_png(height, width, channels) and returns: fobj