code: def _iter_avro_blocks(fo, header, codec, writer_schema, reader_schema):
      
      sync_marker = header['sync']
  
      read_block = BLOCK_READERS.get(codec)
      if not read_block:
          raise ValueError('Unrecognized codec: %r' % codec)
  
      while True:
          offset = fo.tell()
          try:
              num_block_records = read_long(fo)
          except StopIteration:
              return
  
          block_bytes = read_block(fo)
  
          skip_sync(fo, sync_marker)
  
          size = fo.tell() - offset
  
          yield Block(
              block_bytes, num_block_records, codec, reader_schema,
              writer_schema, offset, size
          )
docs: Return iterator over avro blocks.