code: def draw_edcf():
      # extract train_auc and valid_auc into separate lists
      for dataset, architectures in data_dict.items():
          fig, ax = plt.subplots(figsize=(6.4, 3.5))
          print(dataset)
          train_auc = []
          valid_auc = []
          for architecture, epochs in architectures.items():
              for epoch, metrics in epochs.items():
                  if str(epoch_sampled[dataset]) == epoch:
                      train_auc.append(metrics["train_auc"])
                      valid_auc.append(metrics["valid_auc"])
                      break
  
          # calculate and plot ECDF for train_auc
          sorted_train_auc = np.sort(train_auc)
          y_train = np.arange(1, len(sorted_train_auc) + 1) / len(
              sorted_train_auc
          )
          plt.plot(
              sorted_train_auc,
              y_train,
              label="Training  AUC",
              linewidth=3,
              linestyle="--",
          )
  
          # calculate and plot ECDF for valid_auc
          sorted_valid_auc = np.sort(valid_auc)
          y_valid = np.arange(1, len(sorted_valid_auc) + 1) / len(
              sorted_valid_auc
          )
          plt.plot(
              sorted_valid_auc,
              y_valid,
              label="Validation AUC",
              linewidth=3,
              linestyle="-",
          )
  
          y_m = np.quantile(sorted_valid_auc, 0.5, axis=0)
          print("medium", y_m, "best", max(sorted_valid_auc))
          # plt.xlim(left=0.45)
  
          plt.grid()
          plt.xlabel("Accuracy")
          plt.ylabel("ECDF")
          # plt.legend(loc='upper left', fontsize=set_lgend_size)
          plt.tight_layout()
          export_legend(ori_fig=fig, colnum=5)
          fig.savefig(f"space_{dataset}.pdf", bbox_inches="tight")
  
imports: import numpy
  import matplotlib
  import matplotlib.pyplot
  import os
  from src.tools.io_tools import read_json
label_desc: Use image node_id 2 for calling a global function with example usage: draw_edcf() without return types