code: def test_decorator_factory(self):
      # similar to what IPython is doing in traitlets.config.application
      @decorator
      def catch_config_error(method, app, *args, **kwargs):
          return method(app)
  
      catch_config_error(lambda app: None)
  
imports: from __future__ import absolute_import
  import sys
  import doctest
  import unittest
  import decimal
  import inspect
  import functools
  import collections
  from collections import defaultdict
  from decorator import dispatch_on, contextmanager, decorator
label_desc: Use image node_id 5 for calling the ExtraTestCase obj's underlying member method code with example usage: obj.test_decorator_factory() and returns: method