class_docstr: GRU class.
class_docstr_tok: ["GRU","class","."]
docstr: Build GRU sequence.
docstr_tok: ["Build","GRU","sequence","."]
code: def build_sequence(self, xs, masks, init, is_left_to_right):
      """
      Build GRU sequence.
      """
      states = []
      last = init
      if is_left_to_right:
          for i, xs_i in enumerate(xs):
              h = self.build(xs_i, last, masks[i])
              states.append(h)
              last = h
      else:
          for i in range(len(xs) - 1, -1, -1):
              h = self.build(xs[i], last, masks[i])
              states.insert(0, h)
              last = h
      return states
  
file_path: nni/examples/trials/ga_squad/rnn.py
imports: import tensorflow
  from tensorflow.python.ops.rnn_cell_impl import RNNCell
label_desc: Use image node_id 4 for calling the GRU obj's underlying member method code with example usage: obj.build_sequence(xs, masks, init, is_left_to_right) and returns: states