code: def test_register_decorator(self):
      @singledispatch
      def g(obj):
          return "base"
  
      @g.register(int)
      def g_int(i):
          return "int %s" % (i,)
  
      self.assertEqual(g(""), "base")
      self.assertEqual(g(12), "int 12")
  
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 3 for calling the TestSingleDispatch obj's underlying member method code with example usage: obj.test_register_decorator() and returns: str, unknown