code: def test_cat2():
      @make_funsor
      def Cat2(
          x: Funsor,
          y: Funsor,
          i: Bound,
          j: Bound,
          ij: Fresh[lambda i, j: Bint[i.size + j.size]],
      ) -> Fresh[lambda x: x]:
          y = y(**{j.name: i})
          result = Cat(i.name, (x, y))
          result = result(**{i.name: ij})
          return result
  
      inputs = OrderedDict()
      inputs["a"] = Bint[3]
      inputs["b"] = Bint[4]
      x = random_tensor(inputs, Real)
      y = random_tensor(inputs, Real)
      y = y(a="c")  # to avoid bound variable clash
      xy = Cat2(x, y, "a", "c", "ac")
  
      check_funsor(xy, {"ac": Bint[6], "b": Bint[4]}, Real)
  
imports: import math
  from collections import OrderedDict
  import pytest
  import funsor.ops
  from funsor.domains import Array, Bint, Real, Reals
  from funsor.factory import Bound, Fresh, Has, Value, make_funsor, to_funsor
  from funsor.interpretations import reflect
  from funsor.interpreter import reinterpret
  from funsor.tensor import Tensor
  from funsor.terms import Cat, Funsor, Lambda, Number, eager
  from funsor.testing import assert_close, check_funsor, random_tensor, requires_backend
label_desc: Use image node_id 6 for calling a global function with example usage: test_cat2() and returns: result