code: def report_result(self, key, value, annotation=None):
          
          # Default annotation is current pipeline name.
          annotation = str(annotation or self.name)
  
          # In case the value is passed with trailing whitespace.
          value = str(value).strip()
  
          # keep the value in memory:
          self.stats_dict[key] = value
          message_raw = "{key}\t{value}\t{annotation}".format(
              key=key, value=value, annotation=annotation)
  
          message_markdown = "\n> `{key}`\t{value}\t{annotation}\t_RES_".format(
              key=key, value=value, annotation=annotation)
  
          print(message_markdown)
  
          # Just to be extra careful, let's lock the file while we we write
          # in case multiple pipelines write to the same file.
          self._safe_write_to_file(self.pipeline_stats_file, message_raw)
docs: Writes a string to self.pipeline_stats_file.
          
          :param str key: name (key) of the stat
          :param str annotation: By default, the stats will be annotated with the pipeline
              name, so you can tell which pipeline records which stats. If you want, you can
              change this; use annotation='shared' if you need the stat to be used by
              another pipeline (using get_stat()).