code: def evaluate(lib: str, dataset: str, group: str):
      try:
          forecast = pd.read_csv(
              f"data/{lib}-forecasts-{dataset}-{group}.csv"
          )
      except:
          return None
      if lib == "statsforecast":
          col = "ets_statsforecast"
      elif lib == "neuralprophet":
          col = "neuralprophet"
  
      y_test, horizon, freq, seasonality = get_data(
          "data/", dataset, group, False
      )
      y_hat = forecast[col].values.reshape(-1, horizon)
      y_test = y_test["y"].values.reshape(-1, horizon)
  
      evals = {}
      for metric in (mape, smape):
          metric_name = metric.__name__
          loss = metric(y_test, y_hat, axis=1).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 neuralforecast.losses.numpy 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