def METHOD_NAME(self, generator):
    if isinstance(generator, HeatGenerator):
        if generator.name in self._generators:
            logger.warning('Overwriting data generator "{0}"'.format(generator.name))
        self._generators[generator.name] = generator
    else:
        logger.warning("Invalid generator")