code: def merge_consecutive_filter_clauses(ir_blocks):
      
      if not ir_blocks:
          return ir_blocks
  
      new_ir_blocks = [ir_blocks[0]]
  
      for block in ir_blocks[1:]:
          last_block = new_ir_blocks[-1]
          if isinstance(last_block, Filter) and isinstance(block, Filter):
              new_ir_blocks[-1] = Filter(
                  BinaryComposition(u'&&', last_block.predicate, block.predicate))
          else:
              new_ir_blocks.append(block)
  
      return new_ir_blocks
docs: Merge consecutive Filter(x), Filter(y) blocks into Filter(x && y) block.