  
      def refresh(self, *args):  # pylint: disable=unused-argument
          """ Read loss data and apply to graph """
          refresh_var = get_config().tk_vars["refreshgraph"]
          if not refresh_var.get() and self.thread is None:
              return
  
          if self.thread is None:
              logger.debug("Updating plot data")
              self.thread = LongRunningTask(target=self.calcs.refresh)
 
</s> remove     def refresh(self, *args):  # pylint: disable=unused-argument
        """ Read loss data and apply to graph """
 </s> add     def refresh(self, *args) -> None:  # pylint: disable=unused-argument
        """ Read the latest loss data and apply to current graph """ </s> remove         if self.thread is None:
 </s> add         if self._thread is None: </s> remove         self.plotcanvas.draw()
 </s> add         self._plotcanvas.draw() </s> remove             self.thread = LongRunningTask(target=self.calcs.refresh)
            self.thread.start()
 </s> add             self._thread = LongRunningTask(target=self._calcs.refresh)
            self._thread.start() </s> remove         elif not self.thread.complete.is_set():
 </s> add         elif not self._thread.complete.is_set():
        if not refresh_var.get() and self._thread is None:
  
      def refresh(self, *args):  # pylint: disable=unused-argument
          """ Read loss data and apply to graph """
          refresh_var = get_config().tk_vars["refreshgraph"]
        if not refresh_var.get() and self._thread is None:
              return
  
          if self.thread is None:
              logger.debug("Updating plot data")
              self.thread = LongRunningTask(target=self.calcs.refresh)
keep keep keep keep replace keep keep keep keep keep
 Update matplotlib requirement
  - bump min requirement to 3.5.1
  - Fix custom toolbar for v3.5.1
  - Documentation + linting 
lib/gui/display_graph.py