code: def test_not_implemented():
      f = Dispatcher("f")
  
      @f.register(object)
      def _(x):
          return "default"
  
      @f.register(int)
      def _(x):
          if x % 2 == 0:
              return "even"
          else:
              raise MDNotImplementedError()
  
      assert f("hello") == "default"  # default behavior
      assert f(2) == "even"  # specialized behavior
      assert f(3) == "default"  # fall bac to default behavior
      assert raises(NotImplementedError, lambda: f(1, 2))
  
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 18 for calling a global function with example usage: test_not_implemented() and returns: str, str