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