code: def encode(input: str, errors: str = "strict") -> Tuple[bytes, int]:
      return IncrementalEncoder(errors).encode(input, final=True), len(
          input
      )
  
file_path: python-ftfy/ftfy/bad_codecs/utf8_variants.py
imports: import re
  import codecs
  from typing import Tuple
  from encodings.utf_8 import IncrementalDecoder, IncrementalEncoder
label_desc: Use image node_id 1 for calling the StreamWriter obj's underlying member method code with example usage: obj.encode(input, errors) and returns: IncrementalEncoder,  len