code: def to_file(self, path, precision='%.2g'):
          
          table_info = self.get_table_info()
  
          def dump_rows(rows):
              if len(rows) > 1:
                  for row in rows:
                      csv_writer.writerow(row)
                  csv_writer.writerow([])
  
          with open(path, 'wb') as _f:
              csv_writer = csv.writer(_f)
  
              state_rows = [['States']]
              state_rows += [['Name', 'Description', 'State', 'Number of Changes']]
              for state in self.states:
                  state_rows.append([state.name, table_info[state.name]['description'], state.state, state.count])
              dump_rows(state_rows)
  
              stat_rows = [['Statistics']]
              stat_rows += [['Name', 'Description', 'Total', 'Average']]
              for stat in self.statistics:
                  if stat.name == '__submissions__':
                      continue
                  stat_rows.append([stat.name, table_info[stat.name]['description'], stat.count, stat.get_average(0)])
                  dump_rows(stat_rows)
  
              timer_rows = [['Timers']]
              timer_rows += [['Name', 'Description', 'Average Seconds', 'Total Seconds', 'Total Minutes', 'Total Hours', 'Total Days']]
              for timer in self.timers:
                  timer_rows.append([timer.name, table_info[timer.name]['description'],
                                     precision % timer.get_average(0), precision % timer.total_seconds, precision % timer.total_minutes,
                                     precision % timer.total_hours, precision % timer.total_days])
                  dump_rows(timer_rows)
  
              sequence_rows = [['Sequences']]
              sequence_rows += [['Name', 'Description', 'Sequence', 'Number of Completions']]
              for sequence in self.sequences:
                  checkpoints = '-->'.join(map(str, sequence.get_checkpoints()))
                  sequence_rows.append([sequence.name, table_info[sequence.name]['description'], checkpoints, sequence.count])
                  dump_rows(sequence_rows)
docs: Create a CSV report of the trackables
          :param path: path to file
          :param precision: numeric string formatter