code: def evaluate(lib: str, group: str):
      if lib != "ets-r":
          try:
              forecast = pd.read_csv(
                  f"data/{lib}-forecasts-M4-{group}.csv"
              )
          except:
              return None
          horizon = M4Info[group].horizon
          if lib == "statsforecast":
              col = "ets_nixtla"
          elif lib == "prophet":
              col = "prophet"
          else:
              col = "ets_statsmodels"
          forecast = forecast[col].values.reshape(-1, horizon)
      else:
          try:
              forecast = np.loadtxt(
                  f"data/{lib}-forecasts-M4-{group}.txt"
              )
          except:
              return None
      evals = M4Evaluation.evaluate("data", group, forecast)
      times = pd.read_csv(f"data/{lib}-time-M4-{group}.csv")
      evals = evals.rename_axis("dataset").reset_index()
      evals = pd.concat([evals, times], axis=1)
  
      return evals
  
imports: from itertools import product
  import numpy
  import pandas
  from neuralforecast.data.datasets.m4 import M4Evaluation, M4Info
  from src.data import get_data
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(lib, group) and returns: evals, None, None