code: def write(self, path):
          
          meta = {
              'generated_at': self.generated_at,
              'elapsed_time': self.elapsed_time,
          }
          sources = {}
          for result in self.results:
              unique_id = result.node.unique_id
              if result.error is not None:
                  result_dict = {
                      'error': result.error,
                      'state': 'runtime error'
                  }
              else:
                  result_dict = {
                      'max_loaded_at': result.max_loaded_at,
                      'snapshotted_at': result.snapshotted_at,
                      'max_loaded_at_time_ago_in_s': result.age,
                      'state': result.status,
                      'criteria': result.node.freshness,
                  }
              sources[unique_id] = result_dict
          output = FreshnessRunOutput(meta=meta, sources=sources)
          output.write(path)
docs: Create a new object with the desired output schema and write it.