code: def test_predict1():
      """
      Test simple preductions using weights just produced (in test_train1)
      """
      sp = SequencePattern()
      ts2s = TFLearnSeq2Seq(sp, verbose=1)
      wfn = "test_%s" % ts2s.canonical_weights_fn(0)
      print("using weights filename %s" % wfn)
      tf.reset_default_graph()
      prediction, y = ts2s.predict(Xin=range(10), weights_input_fn=wfn)
      assert len(prediction == 10)
  
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 5 for calling a global function with example usage: test_predict1() without return types