docstr: Read and verify checksum
docstr_tok: ["Read","and","verify","checksum"]
code: def crc(self, cid, data):
      """Read and verify checksum"""
  
      # Skip CRC checks for ancillary chunks if allowed to load truncated
      # images
      # 5th byte of first char is 1 [specs, section 5.4]
      if ImageFile.LOAD_TRUNCATED_IMAGES and (i8(cid[0]) >> 5 & 1):
          self.crc_skip(cid, data)
          return
  
      try:
          crc1 = _crc32(data, _crc32(cid))
          crc2 = i32(self.fp.read(4))
          if crc1 != crc2:
              raise SyntaxError(
                  "broken PNG file (bad header checksum in %r)" % cid
              )
      except struct.error:
          raise SyntaxError(
              "broken PNG file (incomplete checksum in %r)" % cid
          )
  
imports: import logging
  import re
  import struct
  import zlib
  from .None import Image, ImageFile, ImagePalette
  from ._binary import i8, i16be, i32be, o16be, o32be
  from ._util import py3
label_desc: Use image node_id 8 for calling the ChunkStream obj's underlying member method code with example usage: obj.crc(cid, data) without return types