code: def test_inheritance():
      @dispatch(A)
      def f(x):  # noqa:F811
          return "a"
  
      @dispatch(B)  # noqa:F811
      def f(x):  # noqa:F811
          return "b"
  
      assert f(A()) == "a"
      assert f(B()) == "b"
      assert f(C()) == "a"
  
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 3 for calling a global function with example usage: test_inheritance() and returns: str, str