code: def test_methods_multiple_dispatch():
      class Foo:
          @dispatch(A, A)
          def f(x, y):  # noqa:F811
              return 1
  
          @dispatch(A, C)  # noqa:F811
          def f(x, y):  # noqa:F811
              return 2
  
      foo = Foo()
      assert foo.f(A(), A()) == 1
      assert foo.f(A(), C()) == 2
      assert foo.f(C(), C()) == 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 12 for calling a global function with example usage: test_methods_multiple_dispatch() and returns: int, int