code: def encode(self, input, final=False):
      if self.encoder is None:
          result = codecs.utf_16_encode(input, self.errors)[0]
          if sys.byteorder == "little":
              self.encoder = codecs.utf_16_le_encode
          else:
              self.encoder = codecs.utf_16_be_encode
          return result
      return self.encoder(input, self.errors)[0]
  
imports: import codecs, sys
label_desc: Use image node_id 2 for calling the IncrementalEncoder obj's underlying member method code with example usage: obj.encode(input, final) and returns: self, result