code: def test_competing_solutions():
      @dispatch(A)
      def h(x):  # noqa:F811
          return 1
  
      @dispatch(C)  # noqa:F811
      def h(x):  # noqa:F811
          return 2
  
      assert h(D()) == 2
  
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 5 for calling a global function with example usage: test_competing_solutions() and returns: int, int