code: def _buffer_decode(self, input, errors, final):
      if self.first:
          if len(input) < 3:
              if codecs.BOM_UTF8.startswith(input):
                  # not enough data to decide if this really is a BOM
                  # => try again on the next call
                  return ("", 0)
              else:
                  self.first = 0
          else:
              self.first = 0
              if input[:3] == codecs.BOM_UTF8:
                  (output, consumed) = codecs.utf_8_decode(
                      input[3:], errors, final
                  )
                  return (output, consumed + 3)
      return codecs.utf_8_decode(input, errors, final)
  
imports: import codecs
label_desc: Use image node_id 2 for calling the IncrementalDecoder obj's underlying member method code with example usage: obj._buffer_decode(input, errors, final) and returns: codecs, str,  int, output,  unknown