[docs]defrun_item_reports(self,cl_item:ClusteringItem,run_id:int,path:Path,state:ClusteringState)->list:"""Generate reports for individual clustering items."""ifself.reportsandlen(self.reports)>0:report_path=PathBuilder.build(path/f'reports/')report_results=[]forreportinself.reports:tmp_report=copy.deepcopy(report)tmp_report.result_path=PathBuilder.build(report_path/tmp_report.name)ifisinstance(report,EncodingReport):tmp_report.dataset=cl_item.datasetrep_result=tmp_report.generate_report()report_results.append(rep_result)elifisinstance(report,ClusteringMethodReport):tmp_report.item=cl_itemrep_result=tmp_report.generate_report()report_results.append(rep_result)gen_rep_count=len(report_results)print_log(f"{state.config.name}: generated {gen_rep_count} reports for setting "f"{cl_item.cl_setting.get_key()}, run id: {run_id+1}.",True)returnreport_resultselse:return[]