code: def change_averaging_window(
      self, new_size, force=False, signals=None
  ):
      if force or self.signals_averaging_window != new_size:
          self.signals_averaging_window = new_size
          win = np.ones(new_size) / new_size
          temp_data = self.bokeh_source_orig.data.copy()
          for col in self.bokeh_source.data.keys():
              if (
                  col == "index"
                  or col in x_axis_options
                  or (
                      signals
                      and not any(col in signal for signal in signals)
                  )
              ):
                  temp_data[col] = temp_data[col][:-new_size]
                  continue
              temp_data[col] = np.convolve(
                  self.bokeh_source_orig.data[col], win, mode="same"
              )[:-new_size]
          self.bokeh_source.data = temp_data
  
          # smooth bollinger bands
          for signal in self.signals.values():
              if signal.has_bollinger_bands:
                  signal.set_bands_source()
  
file_path: coach/rl_coach/dashboard_components/signals_file_base.py
imports: import numpy
  from bokeh.models import ColumnDataSource
  from rl_coach.dashboard_components.signals import Signal
  from rl_coach.dashboard_components.globals import x_axis, x_axis_options, show_spinner
label_desc: Use image node_id 8 for calling the SignalsFileBase obj's underlying member method code with example usage: obj.change_averaging_window(new_size, force, signals) without return types