'Overwrite the exit method to close the GPU API'

def exit(self):

    if self.nvml_ready:
        try:
            pynvml.nvmlShutdown()
        except Exception as e:
            logger.debug('pynvml    failed    to    shutdown    correctly    ({})'.format(e))
    super(Plugin, self).exit()
