code: def batching(size):
      
  
      if size < 1:
          raise ValueError("batching() size must be at least 1")
  
      def batching_transducer(reducer):
          return Batching(reducer, size)
  
      return batching_transducer
docs: Create a transducer which produces non-overlapping batches.