code: def test_raise_error_on_non_class():
      f = Dispatcher("f")
      assert raises(TypeError, lambda: f.add((1,), inc))
  
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 9 for calling a global function with example usage: test_raise_error_on_non_class() without return types