code: def get_png_dim(filepath: str) -> int:
      
      if not imghdr.what(filepath) == 'png':
          raise Exception("not PNG")
      head = open(filepath, 'rb').read(24)
      return struct.unpack('!II', head[16:24])
docs: get_png_dim(filepath:str) -> (int)
      Finds the dimension of a PNG.
      :param filepath: file path of the PNG.
      :returns: (width, height).