code: def scanning(reducer, init=UNSET):
      
  
      reducer2 = reducer
  
      def scanning_transducer(reducer):
          return Scanning(reducer, reducer2, init)
  
      return scanning_transducer
docs: Create a scanning reducer.