code: def _map(self, mapper, output_type, exc_type, input, errors):
      base_error_handler = codecs.lookup_error(errors)
      length = len(input)
      out = output_type()
      while input:
          # first try to use self.error as the error handler
          try:
              part = mapper(input, self.base_encoding, errors=self.name)
              out += part
              break  # All converted
          except exc_type as e:
              # else convert the correct part, handle error as requested and continue
              out += mapper(
                  input[: e.start], self.base_encoding, self.name
              )
              replacement, pos = base_error_handler(e)
              out += replacement
              input = input[pos:]
      return out, length
  
file_path: catboost/contrib/python/fonttools/fontTools/encodings/codecs.py
imports: import codecs
  import encodings
label_desc: Use image node_id 2 for calling the ExtendCodec obj's underlying member method code with example usage: obj._map(mapper, output_type, exc_type, input, errors) and returns: out,  length