  import warnings
  
  from math import ceil
  from threading import Event
  
  import numpy as np
  
  from lib.serializer import get_serializer
 
</s> remove                    "probably a bug which should be fixed:\n{}".format(traceback.format_exc()))
 </s> add                    f"probably a bug which should be fixed:\n{traceback.format_exc()}") </s> remove     def _flatten_outliers(cls, data):
 </s> add     def _flatten_outliers(cls, data: np.ndarray) -> np.ndarray: </s> remove     def _remove_raw(self):
 </s> add     def _remove_raw(self) -> None: </s> remove     def _calc_rate(self):
 </s> add     def _calc_rate(self) -> np.ndarray:
from typing import List, Optional, Tuple, Union
from typing_extensions import Self
  import warnings
  
  from math import ceil
  from threading import Event
from typing import List, Optional, Tuple, Union
from typing_extensions import Self
  
  import numpy as np
  
  from lib.serializer import get_serializer
keep keep keep add keep keep keep keep
 Bugfixes:
  - Stats graph - Handle NaNs in data
  - logger - de-elevate matplotlib font messages 
lib/gui/analysis/stats.py