code: def test_dispatch_method():
      f = Dispatcher("f")
  
      @f.register(list)
      def rev(x):
          return x[::-1]
  
      @f.register(int, int)
      def add(x, y):
          return x + y
  
      class MyList(list):
          pass
  
      assert f.dispatch(list) is rev
      assert f.dispatch(MyList) is rev
      assert f.dispatch(int, int) is add
  
imports: from sympy.multipledispatch.dispatcher import Dispatcher, MDNotImplementedError, MethodDispatcher, halt_ordering, restart_ordering, ambiguity_register_error_ignore_dup
  from sympy.testing.pytest import raises, warns
label_desc: Use image node_id 17 for calling a global function with example usage: test_dispatch_method() and returns: x, unknown