code: def test_competing_ambiguous():
      test_namespace = {}
      dispatch = partial(orig_dispatch, namespace=test_namespace)
  
      @dispatch(A, C)
      def f(x, y):  # noqa:F811
          return 2
  
      with warns(AmbiguityWarning, test_stacklevel=False):
  
          @dispatch(C, A)  # noqa:F811
          def f(x, y):  # noqa:F811
              return 2
  
      assert f(A(), C()) == f(C(), A()) == 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 7 for calling a global function with example usage: test_competing_ambiguous() and returns: int, int