code: def test_halt_method_resolution():
      g = [0]
  
      def on_ambiguity(a, b):
          g[0] += 1
  
      f = Dispatcher("f")
  
      halt_ordering()
  
      def func(*args):
          pass
  
      f.add((int, object), func)
      f.add((object, int), func)
  
      assert g == [0]
  
      restart_ordering(on_ambiguity=on_ambiguity)
  
      assert g == [1]
  
      assert set(f.ordering) == {(int, object), (object, int)}
  
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 14 for calling a global function with example usage: test_halt_method_resolution() without return types