code: def test_methods():
      class Foo:
          @dispatch(float)
          def f(self, x):  # noqa:F811
              return x - 1
  
          @dispatch(int)  # noqa:F811
          def f(self, x):  # noqa:F811
              return x + 1
  
          @dispatch(int)
          def g(self, x):  # noqa:F811
              return x + 3
  
      foo = Foo()
      assert foo.f(1) == 2
      assert foo.f(1.0) == 0.0
      assert foo.g(1) == 4
  
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 11 for calling a global function with example usage: test_methods() and returns: unknown, unknown, unknown