code: def evaluate(lib: str, dataset: str, group: str):
      y_test, horizon, freq, seasonality = get_data(
          "data/", dataset, group, False
      )
      y_test = y_test["y"].values.reshape(-1, horizon)
  
      if "-r" not in lib:
          try:
              forecast = pd.read_csv(
                  f"data/{lib}-forecasts-{dataset}-{group}.csv"
              )
              y_hat = forecast[lib].values.reshape(-1, horizon)
          except:
              return None
      else:
          try:
              y_hat = np.loadtxt(
                  f"data/{lib}-forecasts-{dataset}-{group}.txt"
              )
          except:
              return None
  
      evals = {}
      for metric in (mape, smape):
          metric_name = metric.__name__
          loss = metric(y_test, y_hat)  # .mean()
          evals[metric_name] = loss
  
      evals = (
          pd.DataFrame(evals, index=[f"{dataset}_{group}"])
          .rename_axis("dataset")
          .reset_index()
      )
      times = pd.read_csv(f"data/{lib}-time-{dataset}-{group}.csv")
      evals = pd.concat([evals, times], axis=1)
  
      return evals
  
imports: from itertools import product
  import numpy
  import pandas
  from datasetsforecast.losses import mape, smape
  from src.data import get_data
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(lib, dataset, group) and returns: evals, None, None