code: def test_singledispatch():
      @dispatch(int)
      def f(x):  # noqa:F811
          return x + 1
  
      @dispatch(int)
      def g(x):  # noqa:F811
          return x + 2
  
      @dispatch(float)  # noqa:F811
      def f(x):  # noqa:F811
          return x - 1
  
      assert f(1) == 2
      assert g(1) == 3
      assert f(1.0) == 0
  
      assert raises(NotImplementedError, lambda: f("hello"))
  
imports: from __future__ import annotations
  from typing import Any
  from sympy.multipledispatch import dispatch
  from sympy.multipledispatch.conflict import AmbiguityWarning
  from sympy.testing.pytest import raises, warns
  from functools import partial
label_desc: Use image node_id 1 for calling a global function with example usage: test_singledispatch() and returns: unknown, unknown, unknown