code: def to_buffer(f):
      
      @functools.wraps(f)
      def wrap(*args, **kwargs):
          iterator = kwargs.get('iterator', args[0])
          if not isinstance(iterator, Buffer):
              iterator = Buffer(iterator)
          return f(iterator, *args[1:], **kwargs)
      return wrap
docs: Decorator converting all strings and iterators/iterables into Buffers.