code: def buffer(self, data):
          '''
          Buffer unused bytes from the input stream.
          '''
          if not hasattr(self, '_sock'):
              return None
  
          # data will always be a byte array
          if len(self._buffer):
              self._buffer.extend(data)
          else:
              self._buffer = bytearray(dataf buffer(self, data):
          '''
          Buffer unused bytes from the input stream.
          '''
          if not hasattr(self, '_sock'):
              return None
  
          # data will always be a byte array
          if len(self._buffer):
              self._buffer.extend(data)
          else:
              self._buffer = bytearray(data)
docs: Buffer unused bytes from the input stream.