code: def test_incrementalencoder_error_callback(self):
      inv = self.unmappedunicode
  
      e = self.incrementalencoder()
      self.assertRaises(UnicodeEncodeError, e.encode, inv, True)
  
      e.errors = "ignore"
      self.assertEqual(e.encode(inv, True), b"")
  
      e.reset()
  
      def tempreplace(exc):
          return ("called", exc.end)
  
      codecs.register_error(
          "test.incremental_error_callback", tempreplace
      )
      e.errors = "test.incremental_error_callback"
      self.assertEqual(e.encode(inv, True), b"called")
  
      # again
      e.errors = "ignore"
      self.assertEqual(e.encode(inv, True), b"")
  
imports: import codecs
  import os
  import re
  import sys
  import unittest
  from http.client import HTTPException
  from test import support
  from io import BytesIO
label_desc: Use image node_id 15 for calling the TestBase obj's underlying member method code with example usage: obj.test_incrementalencoder_error_callback() and returns: str,  exc