def close(self):
    if (self.viewer is not None):
        self.viewer.close()
        self.viewer = None
def close(self):
    if (self.viewer is not None):
        self.viewer.close()
        self.viewer = None