code: def draw_structure_data_anytime(
      all_lines: List,
      dataset: str,
      name_img: str,
      max_value,
      figure_size=(6.4, 4.5),
      annotations=[],
      x_ticks=None,
      y_ticks=None,
      unique_labels=None,
  ):
      fig, ax = plt.subplots(figsize=figure_size)
  
      # draw all lines
      time_usage = []
      for i, each_line_info in enumerate(all_lines):
          _x_array = each_line_info[0]
          _y_2d_array = each_line_info[1]
          _name_space = each_line_info[2]
          time_arr = Add_one_line(
              _x_array, _y_2d_array, _name_space, i, ax
          )
          time_usage.append(time_arr)
  
      # print(f"speed-up on {dataset} = {time_usage[0][-1] / time_usage[2][-2]}, "
      #       f"t_train = {time_usage[0][-1]}, t_f = {time_usage[2][-2]}")
  
      # plt.xscale("log")
      # plt.grid()
      # plt.xlabel(r"Time Budget $T$ (min)", fontsize=set_font_size)
      # plt.ylabel(f"AUC on {dataset.upper()}", fontsize=set_font_size)
  
      plt.xscale("log")
      ax.grid()
      ax.set_xlabel(
          r"Response Time Threshold $T_{max}$ (min)",
          fontsize=set_font_size,
      )
      ax.set_ylabel(f"AUC on {dataset.upper()}", fontsize=set_font_size)
      # ax.set_xscale("log")
      # ax.set_xlim(0.001, 10e4)
      # ax.set_ylim(x1_lim[0], x1_lim[1])
  
      if y_ticks is not None:
          if y_ticks[0] is not None:
              ax.set_ylim(bottom=y_ticks[0])
          if y_ticks[1] is not None:
              ax.set_ylim(top=y_ticks[1])
          # ax.set_ylim(y_ticks[0], y_ticks[1])
          # ax.set_yticks(y_ticks)
          # ax.set_yticklabels(y_ticks)
      if x_ticks is not None:
          if x_ticks[0] is not None:
              ax.set_xlim(left=x_ticks[0])
          if x_ticks[1] is not None:
              ax.set_xlim(right=x_ticks[1])
  
      ax.yaxis.set_major_locator(MaxNLocator(nbins=6, integer=False))
  
      if max_value > 0:
          plt.axhline(
              max_value,
              color="r",
              linestyle="-",
              label="Global Best AUC",
          )
  
      for i in range(len(annotations)):
          ele = annotations[i]
          ax.plot(
              ele[2],
              ele[1],
              mark_list[i],
              label=ele[0],
              markersize=set_marker_point,
          )
  
      # export_legend(fig, filename="any_time_legend", unique_labels=["Training-Based MS", "Training-Free MS", "2Phase-MS", 'Global Best AUC'])
      export_legend(ori_fig=fig, colnum=5, unique_labels=unique_labels)
      plt.tight_layout()
  
      fig.savefig(f"{name_img}.pdf", bbox_inches="tight")
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/exps/draw_tab_lib.py
imports: from typing import List
  import numpy
  from matplotlib import pyplot
  from matplotlib.ticker import MaxNLocator
  import warnings
  import matplotlib.cbook
  import seaborn
  import matplotlib.pyplot
label_desc: Use image node_id 2 for calling a global function with example usage: draw_structure_data_anytime(all_lines, dataset, name_img, max_value, figure_size, annotations, x_ticks, y_ticks, unique_labels) without return types