def METHOD_NAME(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)