code: def create_comment_output(task, status):
      """Create a markdown table from a ClearML task's output scalars."""
      retrieve_scalars_dict = task.get_last_scalar_metrics()
      if retrieve_scalars_dict:
          scalars_tables = create_output_tables(retrieve_scalars_dict)
          df = pd.DataFrame(
              data=scalars_tables,
              columns=["Title", "Series", "Last", "Min", "Max"],
          )
          df.style.set_caption(
              f"Last scalars metrics for task {task.task_id}, task status {status}"
          )
          table = tabulate(
              df, tablefmt="github", headers="keys", showindex=False
          )
          return table
  
file_path: clearml/examples/cicd/task_stats_to_comment.py
imports: import json
  import os
  import pandas
  from clearml import Task
  from github3 import login
  from tabulate import tabulate
label_desc: Use image node_id 2 for calling a global function with example usage: create_comment_output(task, status) and returns: table