code: def _generate_tests(test_class, test_func, test_name, options):
      from itertools import chain, combinations, product
  
      def powerset(iterable):
          "powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"
          s = list(iterable)
          return chain.from_iterable(
              combinations(s, r) for r in range(len(s) + 1)
          )
  
      key_value_tuple = {}
      for option, values in list(options.items()):
          key_value_tuple[option] = [(option, i) for i in values]
  
      for option_groups in powerset(key_value_tuple.values()):
          for input_kwargs in product(*option_groups):
              kwargs = {i[0]: i[1] for i in input_kwargs}
              setattr(
                  test_class,
                  "test_{}_{}".format(
                      test_name,
                      "__".join(
                          [
                              "_".join([str(s) for s in i])
                              for i in kwargs.items()
                          ]
                      ),
                  ),
                  _generate_test(test_func, **kwargs),
              )
  
imports: import cufflinks
  import pandas
  import numpy
  import unittest
  from nose.tools import assert_equals
label_desc: Use image node_id 16 for calling a global function with example usage: _generate_tests(test_class, test_func, test_name, options) and returns: chain