code: def gen_tests(data_dir, verbose=1):
      class TestFastTextPy(unittest.TestCase):
          pass
  
      i = 0
      for configuration in get_supervised_models(verbose=verbose):
          setattr(
              TestFastTextPy,
              "test_sup_" + str(i) + "_" + configuration["dataset"],
              gen_sup_test(configuration, data_dir),
          )
          i += 1
      return TestFastTextPy
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from fasttext import train_supervised
  from fasttext import train_unsupervised
  from fasttext import util
  import fasttext
  import os
  import subprocess
  import unittest
  import tempfile
  import random
  import sys
  import copy
  import numpy
  from fasttext.tests.test_configurations import get_supervised_models
label_desc: Use image node_id 11 for calling a global function with example usage: gen_tests(data_dir, verbose) and returns: TestFastTextPy