          return hlp
  
  
  class StatsData(ttk.Frame):  # pylint: disable=too-many-ancestors
      """ Stats frame of analysis tab """
      def __init__(self, parent, selected_id, helptext):
          logger.debug("Initializing: %s: (parent, %s, selected_id: %s, helptext: '%s')",
                       self.__class__.__name__, parent, selected_id, helptext)
          super().__init__(parent)
          self.pack(side=tk.TOP, padx=5, pady=5, fill=tk.BOTH, expand=True)
 
</s> remove         self.session = None  # set when loading or clearing from parent
        self.thread = None  # Thread for loading data popup
        self.selected_id = selected_id
        self.popup_positions = list()

        self.canvas = tk.Canvas(self, bd=0, highlightthickness=0)
        self.canvas.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)

        self.tree_frame = ttk.Frame(self.canvas)
        self.tree_canvas = self.canvas.create_window((0, 0), window=self.tree_frame, anchor=tk.NW)
        self.sub_frame = ttk.Frame(self.tree_frame)
        self.sub_frame.pack(side=tk.LEFT, fill=tk.X, anchor=tk.N, expand=True)

        self.add_label()
        self.tree = ttk.Treeview(self.sub_frame, height=1, selectmode=tk.BROWSE)
        self.scrollbar = ttk.Scrollbar(self.tree_frame, orient="vertical", command=self.tree.yview)
        self.scrollbar.pack(side=tk.RIGHT, fill=tk.Y)

        self.columns = self.tree_configure(helptext)
        self.canvas.bind("<Configure>", self.resize_frame)
 </s> add  </s> remove         self._session = None
 </s> add  </s> remove         GraphBase.__init__(self, parent, data, ylabel)
 </s> add         super().__init__(parent, data, ylabel) </s> remove         GraphBase.__init__(self, parent, data, ylabel)
 </s> add         super().__init__(parent, data, ylabel) </s> remove         self.trace_var = None
 </s> add         self._trace_vars = dict()
    """ Stats frame of analysis tab.

    Holds the tree-view containing the summarized session statistics in the Analysis tab.

    Parameters
    ----------
    parent: :class:`tkinter.Frame`
        The frame within the Analysis Notebook that will hold the statistics
    selected_id: :class:`tkinter.IntVar`
        The tkinter variable that holds the currently selected session ID
    helptext: str
        The help text to display for the summary statistics page
    """
          return hlp
  
  
  class StatsData(ttk.Frame):  # pylint: disable=too-many-ancestors
    """ Stats frame of analysis tab.

    Holds the tree-view containing the summarized session statistics in the Analysis tab.

    Parameters
    ----------
    parent: :class:`tkinter.Frame`
        The frame within the Analysis Notebook that will hold the statistics
    selected_id: :class:`tkinter.IntVar`
        The tkinter variable that holds the currently selected session ID
    helptext: str
        The help text to display for the summary statistics page
    """
      def __init__(self, parent, selected_id, helptext):
          logger.debug("Initializing: %s: (parent, %s, selected_id: %s, helptext: '%s')",
                       self.__class__.__name__, parent, selected_id, helptext)
          super().__init__(parent)
          self.pack(side=tk.TOP, padx=5, pady=5, fill=tk.BOTH, expand=True)
keep keep keep keep replace 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_analysis.py