code: def _tests_factory(grapher_analyzers):
      for grapher in grapher_analyzers:
  
          def _test_func_factory(grapher):
              test_func = lambda self: self._perform_test(grapher)
              test_func.__doc__ = "Test Graphers: %s" % grapher.name()
              return test_func
  
          test_func_name = "test_%s" % grapher.name()
          test_func = _test_func_factory(grapher)
  
          setattr(Test_graphers_analyzers, test_func_name, test_func)
  
file_path: TimeSide/tests/test_graphers_render_analyzers.py
imports: from __future__ import division
  import unittest
  from unit_timeside import TestRunner
  import timeside
  from timeside.core.tools.test_samples import samples
  from tempfile import NamedTemporaryFile
  import os
  from timeside.core.grapher import DisplayAnalyzer
label_desc: Use image node_id 1 for calling a global function with example usage: _tests_factory(grapher_analyzers) and returns: test_func