code: def read_png(filename) -> np.ndarray:
      filename = tfds.core.as_path(filename)
      png_reader = png.Reader(bytes=filename.read_bytes())
      width, height, pngdata, info = png_reader.read()
      del png_reader
  
      bitdepth = info["bitdepth"]
      if bitdepth == 8:
          dtype = np.uint8
      elif bitdepth == 16:
          dtype = np.uint16
      else:
          raise NotImplementedError(f"Unsupported bitdepth: {bitdepth}")
  
      plane_count = info["planes"]
      pngdata = np.vstack(list(map(dtype, pngdata)))
      return pngdata.reshape((height, width, plane_count))
  
file_path: kubric/challenges/pretraining_visual/shapenet_pretraining.py
imports: import itertools
  import json
  import logging
  import numpy
  import png
  import tensorflow
  import tensorflow_datasets.public_api
  from typing import List
label_desc: Use image node_id 1 for calling a global function with example usage: read_png(filename) and returns: pngdata