code: def test_sp2():
      """
      Test two SequencePattern instance with lengths different from default
      """
      sp = SequencePattern("sorted", in_seq_len=20, out_seq_len=5)
      x = np.random.randint(0, 9, 20)
      y = sp.generate_output_sequence(x)
      assert len(y) == 5
      y_exp = sorted(x)[:5]
      assert all(y == y_exp)
  
imports: from __future__ import division, print_function
  import os
  import sys
  import tflearn
  import argparse
  import json
  import numpy
  import tensorflow.compat.v1
  from tensorflow.contrib.legacy_seq2seq.python.ops import seq2seq
  from tensorflow.python.ops import rnn_cell
label_desc: Use image node_id 3 for calling a global function with example usage: test_sp2() without return types