code: def display_scores(scores, root=None):
      output_readme = {}
      output_rst = {}
  
      for obj in scores:
          output_rst[obj["dataset"]] = BeautifulTable()
          output_rst[obj["dataset"]].set_style(BeautifulTable.STYLE_RST)
          output_rst[obj["dataset"]].column_headers = [
              "Model",
              "MR",
              "MRR",
              "Hits@1",
              "Hits@3",
              "Hits@10",
              "Time (s)",
              "ES epochs",
              "Hyperparameters",
          ]
  
      for obj in scores:
          try:
              output_rst[obj["dataset"]].append_row(
                  [
                      obj["model"],
                      "{0:.1f}".format(obj["mr"]),
                      "{0:.4f}".format(obj["mrr"]),
                      "{0:.3f}".format(obj["H@1"]),
                      "{0:.3f}".format(obj["H@3"]),
                      "{0:.3f}".format(obj["H@10"]),
                      "{0:.1f}".format(obj["time"]),
                      "{}".format(obj["early_stopping_epoch"]),
                      yaml.dump(
                          obj["hyperparams"], default_flow_style=False
                      ),
                  ]
              )
          except:
              output_rst[obj["dataset"]].append_row(
                  [
                      obj["model"],
                      ".??",
                      ".??",
                      ".??",
                      ".??",
                      ".??",
                      ".??",
                      ".??",
                      ".??",
                  ]
              )
  
      if root is not None:
          fmt = "%Y-%m-%d-%H-%M-%S"
          date = datetime.datetime.now().strftime(fmt)
          name = os.path.join(
              root,
              f"result_{obj['model']}_{obj['dataset']}_{date}_rst.json",
          )
          out = {str(x): str(y) for x, y in output_rst.items()}
          with open(
              os.path.join(
                  root,
                  f"result_{obj['model']}_{obj['dataset']}_{date}.rst",
              ),
              "w",
          ) as f:
              f.write(str(output_rst))
          with open(name, "w") as f:
              f.write(json.dumps(out))
          print("Experiments' results saved in {}.".format(name))
  
      for key, value in output_rst.items():
          print(key)
          print(value)
  
imports: import os
  import argparse
  import datetime
  import itertools
  import json
  import logging
  import sys
  import time
  import warnings
  import numpy
  import tensorflow
  import yaml
  from beautifultable import BeautifulTable
  from docopt import docopt
  from schema import And, Schema, Use
  from tqdm import tqdm
  import ampligraph.datasets
  from ampligraph.compat import evaluate_performance
  from ampligraph.evaluation import hits_at_n_score, mr_score, mrr_score
  from ampligraph.utils import save_model
label_desc: Use image node_id 1 for calling a global function with example usage: display_scores(scores, root) without return types