def handler():
            nonlocal called
            called += 1
            raise ValueError("yeah sync")
def close(figure):
        """!
        @brief Closes figure object that was used or allocated by the visualizer.