code: def write_png(filepath, img):
      cv2 = tfds.core.lazy_imports.cv2
      with tf.io.gfile.GFile(filepath, "wb") as f:
          _, buf = cv2.imencode(
              ".png", img, (cv2.IMWRITE_PNG_COMPRESSION, 9)
          )
          f.write(buf.tobytes())
  
file_path: datasets/tensorflow_datasets/testing/fake_data_generation/curated_breast_imaging_ddsm.py
imports: import csv
  import os
  from absl import app
  from absl import flags
  import numpy
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling a global function with example usage: write_png(filepath, img) without return types