  from tkinter import ttk
  from math import ceil, floor
  
  import matplotlib
  # pylint: disable=wrong-import-position
  matplotlib.use("TkAgg")
  
  from matplotlib import style  # noqa
 
</s> remove from math import ceil, sqrt
 </s> add from math import ceil
from threading import Event </s> remove from .control_helper import ControlBuilder, ControlPanelOption
from .display_graph import SessionGraph
from .display_page import DisplayPage
from .stats import Calculations, Session
 </s> add  </s> remove from lib.gui import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, Session, DisplayNotebook,
 </s> add from lib.gui import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, DisplayNotebook, </s> remove from .stats import Calculations
 </s> add from .stats import Calculations, Session
import numpy as np
  from tkinter import ttk
  from math import ceil, floor
  
import numpy as np
  import matplotlib
  # pylint: disable=wrong-import-position
  matplotlib.use("TkAgg")
  
  from matplotlib import style  # noqa
keep keep add keep keep keep keep keep
 GUI - Stats optimization (#1067)

* Faster stat loading + caching

* Compress data in cache

* Optimize some calculations

* Vectorize smoothing

* stats.Calculations optimized

* Load latest training data from live iterator

* Add options to training graph 
lib/gui/display_graph.py