              raw_keys = [key for key in self._stats if key.startswith("raw_")]
              for key in raw_keys:
                  selected_key = f"{selection}_{key.replace('raw_', '')}"
                  self._stats[selected_key] = method(self._stats[key])
  
      def _calc_avg(self, data: np.ndarray) -> np.ndarray:
          """ Calculate moving average.
  
          Parameters
 
</s> remove     def _calc_avg(self, data):
 </s> add     def _calc_avg(self, data: np.ndarray) -> np.ndarray: </s> remove     def _calc_trend(cls, data):
 </s> add     def _calc_trend(cls, data: np.ndarray) -> np.ndarray: </s> remove     def _calc_smoothed(self, data):
 </s> add     def _calc_smoothed(self, data: np.ndarray) -> np.ndarray: </s> remove     def __call__(self):
 </s> add     def __call__(self) -> np.ndarray: </s> remove     def _ewma_vectorized_2d(self, data, out):
 </s> add     def _ewma_vectorized_2d(self, data: np.ndarray, out: np.ndarray) -> None:
        logger.debug("Got calculations: %s", {k: f"Total: {len(v)}, Min: {np.nanmin(v)}, "
                                                 f"Max: {np.nanmax(v)}, "
                                                 f"nans: {np.count_nonzero(np.isnan(v))}"
                                              for k, v in self.stats.items()
                                              if not k.startswith("raw")})
              raw_keys = [key for key in self._stats if key.startswith("raw_")]
              for key in raw_keys:
                  selected_key = f"{selection}_{key.replace('raw_', '')}"
                  self._stats[selected_key] = method(self._stats[key])
        logger.debug("Got calculations: %s", {k: f"Total: {len(v)}, Min: {np.nanmin(v)}, "
                                                 f"Max: {np.nanmax(v)}, "
                                                 f"nans: {np.count_nonzero(np.isnan(v))}"
                                              for k, v in self.stats.items()
                                              if not k.startswith("raw")})
  
      def _calc_avg(self, data: np.ndarray) -> np.ndarray:
          """ Calculate moving average.
  
          Parameters
keep keep keep add keep keep keep keep keep
 Bugfixes:
  - Stats graph - Handle NaNs in data
  - logger - de-elevate matplotlib font messages 
lib/gui/analysis/stats.py