code: def test_dispatcher_as_decorator():
      f = Dispatcher("f")
  
      @f.register(int)
      def inc(x):  # noqa:F811
          return x + 1
  
      @f.register(float)  # noqa:F811
      def inc(x):  # noqa:F811
          return x - 1
  
      assert f(1) == 2
      assert f(1.0) == 0.0
  
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 6 for calling a global function with example usage: test_dispatcher_as_decorator() and returns: unknown, unknown