def gen_report(report_type: str, file_name: str, segments: list, images: list) -> None: """ Generate report. """ report = Report(report_type, file_name) report.insert_header('Daily Report') if len(segments) > 0: for segment in segments: report.insert_text_segment(segment) if len(segments) == 0: report.insert_error_msg('No segments to display') # if len(images) > 0: # report.insert_images(images) if len(images) == 0: report.insert_error_msg('No images to display') report.save_report('Ogre_daily.pdf')