def add_generator(self, generator_name, generator):

        if not isinstance(generator, types.GeneratorType):
            raise ValueError(
                'Cannot add generator named {0}, it is not a generator type'.format(generator_name))

        self.generators[str(generator_name)] = generator
        #logging.debug('Context: Added generator named {0}'.format(generator_name))
Adds a generator to the context, this can be used to set values for a variable
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/binding.py/Context.add_generator