code: def test_register_error(self):
      @singledispatch
      def g(obj):
          return "base"
  
      with assertRaises(TypeError):
          # wrong number of arguments
          @g.register(int)
          def g_int():
              return "int"
  
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 4 for calling the TestSingleDispatch obj's underlying member method code with example usage: obj.test_register_error() and returns: str, str