code: def get_test_fn() -> Dispatcher:
      test_fn = Dispatcher("test_fn")
  
      @test_fn.register(A1, B1)
      def test_a1_b1(x: A1, y: B1) -> str:
          return "a1-b1"
  
      @test_fn.register(A2, B1)
      def test_a2_b1(x: A2, y: B1) -> str:
          return "a2-b1"
  
      @test_fn.register(A1, B2)
      def test_a1_b2(x: A1, y: B2) -> str:
          return "a1-b2"
  
      return test_fn
  
file_path: GPflow/tests/gpflow/utilities/test_multipledispatch.py
imports: import re
  import warnings
  from typing import Any, Type
  import multipledispatch
  import pytest
  import tensorflow
  from _pytest.capture import CaptureFixture
  from packaging.version import Version
  import gpflow
  from gpflow.utilities import Dispatcher
label_desc: Use image node_id 1 for calling a global function with example usage: get_test_fn() and returns: test_fn, str, str, str