code: def test_op_gather_dynamic_axes_equivalence(device_id, precision):
      input_data1 = AA([1], dtype=PRECISION_TO_TYPE[precision])
      input_data2 = AA([2], dtype=PRECISION_TO_TYPE[precision])
  
      a = C.sequence.input_variable(
          shape=input_data1.shape,
          dtype=sanitize_dtype_cntk(PRECISION_TO_TYPE[precision]),
          name="a",
      )
      b = C.sequence.input_variable(
          shape=input_data2.shape,
          dtype=sanitize_dtype_cntk(PRECISION_TO_TYPE[precision]),
          name="b",
      )
  
      is_last_a = C.sequence.is_last(a)
      a_last = C.sequence.gather(a, is_last_a)
      b_last = C.sequence.gather(b, is_last_a)
      z = a_last + b_last
  
      # create batch
      input_data1.shape = (1, 1) + input_data1.shape
      input_data2.shape = (1, 1) + input_data2.shape
  
      res = z.eval({a: input_data1, b: input_data2})
      expected_forward = [[[3.0]]]
      assert np.array_equal(res, expected_forward)
  
imports: from __future__ import division
  import numpy
  import pytest
  import cntk
  from .ops_test_utils import cntk_device
  from cntk.tests.test_utils import _to_dense, _to_csr
  from .ops_test_utils import unittest_helper, _test_unary_op, _test_binary_op, AA, precision, PRECISION_TO_TYPE, cntk_device
  from cntk import Value
  from cntk.axis import Axis
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
label_desc: Use image node_id 20 for calling a global function with example usage: test_op_gather_dynamic_axes_equivalence(device_id, precision) without return types