code: def check_features_block_windows(features, src, bidx):
      """Compare GeoJSON features to a datasource's blocks + windows.
  
      Parameters
      ----------
      features : iter
          GeoJSON features
      src : a dataset object opened in 'r' mode
          Open input datasource
  
      Returns
      -------
      bool
          ``True`` if the two block/window streams match and ``False`` otherwise
      """
  
      out = []
      iterator = zip_longest(features, src.block_windows(bidx=bidx))
      for feat, (block, window) in iterator:
          out.append(
              np.array_equal(
                  json.loads(feat["properties"]["block"]), block
              )
          )
  
          f_win = feat["properties"]["window"]
          assert f_win["col_off"] == window.col_off
          assert f_win["row_off"] == window.row_off
  
      return all(out)
  
file_path: rasterio/tests/test_rio_blocks.py
imports: from itertools import zip_longest
  import json
  import re
  import numpy
  import rasterio
  from rasterio.warp import transform_bounds
  from rasterio.rio.main import main_group
label_desc: Use image node_id 1 for calling a global function with example usage: check_features_block_windows(features, src, bidx) and returns: all