docstr: Returns the leaderboard after fitting
docstr_tok: ["Returns","the","leaderboard","after","fitting"]
code: def get_leaderboard(self, ascending=True) -> Optional[pd.DataFrame]:
      """
      Returns the leaderboard after fitting
      """
      names = []
      mean_cv_scores = []
      # std_cv_scores = [] # TODO: Add later
      local_ml_dict = self.ml_dict
      if local_ml_dict is not None:
          model_names = list(local_ml_dict.keys())
          if model_names != []:
              for model_name in model_names:
                  names.append(model_name)
                  model_dict_single_model = local_ml_dict.get(
                      model_name
                  )
                  if model_dict_single_model is not None:
                      cv_scores = model_dict_single_model.get(
                          self.score_type
                      )
                      #### This is quite complicated since we have to make sure it doesn't blow up
                      if np.any(cv_scores) == np.inf:
                          mean_cv_score = np.inf
                      elif isinstance(cv_scores, list):
                          if len(cv_scores) == 0:
                              mean_cv_score = np.inf
                          else:
                              mean_cv_score = get_mean_cv_score(
                                  cv_scores
                              )
                      else:
                          mean_cv_score = get_mean_cv_score(cv_scores)
                      # if isinstance(cv_scores, float):
                      #     mean_cv_score = cv_scores
                      # else: # Assuming List
                      #     mean_cv_score = sum(cv_scores)/len(cv_scores)
                      mean_cv_scores.append(mean_cv_score)
  
              results = pd.DataFrame(
                  {"name": names, self.score_type: mean_cv_scores}
              )
              results.sort_values(
                  self.score_type, ascending=ascending, inplace=True
              )
              return results
          else:
              return None
      else:
          return None
  
imports: import warnings
  from typing import List, Dict, Optional, Tuple, Union
  from datetime import datetime
  import copy
  from collections import defaultdict
  import operator
  from time import time
  import pdb
  import pandas
  import numpy
  import dask
  import dask.dataframe
  from sklearn.exceptions import DataConversionWarning
  import seaborn
  import seaborn
  import matplotlib.pyplot
  from .models import BuildBase, BuildArima, BuildAutoSarimax, BuildVAR, BuildML
  from .models.build_prophet import BuildProphet
  from .utils import colorful, load_ts_data, convert_timeseries_dataframe_to_supervised, time_series_plot, print_static_rmse, print_dynamic_rmse, quick_ts_plot, test_stationarity, print_ts_model_stats
  from .__version__ import __version__
label_desc: Use image node_id 10 for calling the auto_timeseries obj's underlying member method code with example usage: obj.get_leaderboard(ascending) and returns: None, results, None