code: def load_csv(self, idx=None, result=None):
      # load csv and fix sparse data.
      # csv can be in the middle of being written so we use try - except
      new_csv = None
      while new_csv is None:
          try:
              new_csv = pd.read_csv(self.full_csv_path)
              break
          except EmptyDataError:
              new_csv = None
              continue
  
      new_csv["Wall-Clock Time"] /= 60.0
      new_csv = new_csv.interpolate()
      # remove signals which don't contain any values
      for k, v in new_csv.isna().all().items():
          if v and k not in x_axis_options:
              del new_csv[k]
  
      # only fill the missing values that the previous interploation did not deal with (usually the ones before the
      # first update to the signal was made). We do so again by interpolation (averaging the previous and the next
      # values)
      new_csv = (
          (
              (
                  new_csv.fillna(method="bfill")
                  + new_csv.fillna(method="ffill")
              )
              / 2
          )
          .fillna(method="bfill")
          .fillna(method="ffill")
      )
  
      self.csv = new_csv
  
      self.last_modified = os.path.getmtime(self.full_csv_path)
  
      if idx is not None:
          result[idx] = (self.csv, self.last_modified)
  
file_path: coach/rl_coach/dashboard_components/signals_file.py
imports: import os
  from os.path import basename
  import pandas
  from pandas.errors import EmptyDataError
  from rl_coach.dashboard_components.signals_file_base import SignalsFileBase
  from rl_coach.dashboard_components.globals import x_axis_options
  from rl_coach.utils import break_file_path
label_desc: Use image node_id 2 for calling the SignalsFile obj's underlying member method code with example usage: obj.load_csv(idx, result) without return types