code: def test_train1():
      """
      Test simple training of an embedding_rnn seq2seq model
      """
      sp = SequencePattern()
      ts2s = TFLearnSeq2Seq(sp)
      ofn = "test_%s" % ts2s.canonical_weights_fn(0)
      print("using weights filename %s" % ofn)
      if os.path.exists(ofn):
          os.unlink(ofn)
      tf.reset_default_graph()
      ts2s.train(num_epochs=1, num_points=10000, weights_output_fn=ofn)
      assert os.path.exists(ofn)
  
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 4 for calling a global function with example usage: test_train1() without return types