code: def gather(seq, condition, new_sequence_axis_typeinfo=None, name=""):
      """
      Takes two sequences of the same length and returns a new sequence whose
      elements are those elements of sequence ``seq`` whose corresponding element
      in ``condition`` is True, preserving the ordering of ``seq``.
  
      This operation is also known as stream compaction, or copy_if.
  
      Example:
          >>> x = C.sequence.input_variable(shape=(3,2))
          >>> z = C.greater(C.reduce_sum(x),60)
          >>> y = C.sequence.gather(x,z)
          >>> # create one sequence of 4 tensors each with shape (3,2)
          >>> x0 = np.reshape(np.arange(24.0,dtype=np.float32),(1,4,3,2))
          >>> y.eval({x:x0})
          [array([[[ 12.,  13.],
                   [ 14.,  15.],
                   [ 16.,  17.]],
          <BLANKLINE>
                  [[ 18.,  19.],
                   [ 20.,  21.],
                   [ 22.,  23.]]], dtype=float32)]
  
      Args:
          seq: the symbolic sequence from which elements will be selected
          condition: the symbolic sequence of booleans which indicate which
              elements should be selected
          new_sequence_axis_typeinfo:  tuple of integers indicating
              the scaling and additive factors for the length of the new sequence axis
              w.r.t. the operand sequence. This is used to determine the sequence axis
              to be used for the output of the gather operation. If this argument is left
              unspecified, a new independent sequence axis is created.
          name (str): the name of the node in the network
      Returns:
          :class:`~cntk.ops.functions.Function`
      """
      from cntk.cntk_py import gather
  
      seq = sanitize_input(seq, get_data_type(seq))
      condition = sanitize_input(condition, get_data_type(condition))
      if new_sequence_axis_typeinfo is None:
          return gather(seq, condition, name)
      else:
          return gather(
              seq, condition, new_sequence_axis_typeinfo, name
          )
  
imports: import numpy
  from cntk.internal import typemap, sanitize_input
  from cntk.internal.utils import get_data_type
  from ...axis import Axis
  from ...default_options import default_override_or
label_desc: Use image node_id 13 for calling a global function with example usage: gather(seq, condition, new_sequence_axis_typeinfo, name) and returns: gather, gather