code: def test_main2():
      """
      Integration test - training then prediction
      """
      import tempfile
  
      tempdir = tempfile.mkdtemp()
      arglist = (
          "--data-dir %s -e 2 --iter-num=1 -v -v --tensorboard-verbose=1 train 5000"
          % tempdir
      )
      arglist = arglist.split(" ")
      tf.reset_default_graph()
      ts2s = CommandLine(arglist=arglist)
      wfn = ts2s.weights_output_fn
      assert os.path.exists(wfn)
  
      arglist = "-i %s predict 1 2 3 4 5 6 7 8 9 0" % wfn
      arglist = arglist.split(" ")
      tf.reset_default_graph()
      ts2s = CommandLine(arglist=arglist)
      assert len(ts2s.prediction_results[0][0]) == 10
  
      os.system("rm -rf %s" % tempdir)
  
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 9 for calling a global function with example usage: test_main2() without return types