code: def test_error_handler_subclass(app):
      class ParentException(Exception):
          pass
  
      class ChildExceptionUnregistered(ParentException):
          pass
  
      class ChildExceptionRegistered(ParentException):
          pass
  
      @app.errorhandler(ParentException)
      def parent_exception_handler(e):
          assert isinstance(e, ParentException)
          return "parent"
  
      @app.errorhandler(ChildExceptionRegistered)
      def child_exception_handler(e):
          assert isinstance(e, ChildExceptionRegistered)
          return "child-registered"
  
      @app.route("/parent")
      def parent_test():
          raise ParentException()
  
      @app.route("/child-unregistered")
      def unregistered_test():
          raise ChildExceptionUnregistered()
  
      @app.route("/child-registered")
      def registered_test():
          raise ChildExceptionRegistered()
  
      c = app.test_client()
  
      assert c.get("/parent").data == b"parent"
      assert c.get("/child-unregistered").data == b"parent"
      assert c.get("/child-registered").data == b"child-registered"
  
file_path: flask/tests/test_user_error_handler.py
imports: import pytest
  from werkzeug.exceptions import Forbidden
  from werkzeug.exceptions import HTTPException
  from werkzeug.exceptions import InternalServerError
  from werkzeug.exceptions import NotFound
  import flask
label_desc: Use image node_id 2 for calling a global function with example usage: test_error_handler_subclass(app) and returns: str, str