code: def _buffer_decode(self, input, errors, final):
      if errors != "strict":
          raise UnicodeError("Unsupported error handling " + errors)
  
      if not input:
          return ("", 0)
  
      # IDNA allows decoding to operate on Unicode strings, too.
      if isinstance(input, unicode):
          labels = dots.split(input)
      else:
          # Must be ASCII string
          input = str(input)
          unicode(input, "ascii")
          labels = input.split(".")
  
      trailing_dot = ""
      if labels:
          if not labels[-1]:
              trailing_dot = "."
              del labels[-1]
          elif not final:
              # Keep potentially unfinished label until the next call
              del labels[-1]
              if labels:
                  trailing_dot = "."
  
      result = []
      size = 0
      for label in labels:
          result.append(ToUnicode(label))
          if size:
              size += 1
          size += len(label)
  
      result = ".".join(result) + trailing_dot
      size += len(trailing_dot)
      return (result, size)
  
imports: import stringprep, re, codecs
  from unicodedata import ucd_3_2_0
label_desc: Use image node_id 1 for calling the IncrementalDecoder obj's underlying member method code with example usage: obj._buffer_decode(input, errors, final) and returns: result,  size, str,  int