code: def determine_run_number(self) -> int:
          
          run_number = 0
          run_number_file = self.data_path.joinpath('run_number.txt')
          if run_number_file.exists():
              run_number = int(run_number_file.read_text()) + 1
          run_number_file.write_text(str(run_number))
          log.info('Run number', run_number=run_number)
          return run_number
docs: Determine the current run number.
  
          We check for a run number file, and use any number that is logged
          there after incrementing it.