code: def set_printed_time(self, sample):
          
          if api.get_workflow_status_of(sample) != "published":
              return False
          reports = sample.objectValues("ARReport")
          reports = sorted(reports, key=lambda report: report.getDatePublished())
          last_report = reports[-1]
          if not last_report.getDatePrinted():
              last_report.setDatePrinted(DateTime())
              sample.reindexObject(idxs=["getPrinted"])
          return True
docs: Updates the printed time of the last results report from the sample