code: def test_global_modeling_with_events_only():
      # GLOBAL MODELLING + EVENTS
      log.info("Global Modeling + Events")
      df = pd.read_csv(PEYTON_FILE, nrows=512)
      df1_0 = df.iloc[:128, :].copy(deep=True)
      df2_0 = df.iloc[128:256, :].copy(deep=True)
      df3_0 = df.iloc[256:384, :].copy(deep=True)
      df4_0 = df.iloc[384:, :].copy(deep=True)
      df1_0["ID"] = "df1"
      df2_0["ID"] = "df2"
      df3_0["ID"] = "df1"
      df4_0["ID"] = "df2"
      playoffs_history = pd.DataFrame(
          {
              "event": "playoff",
              "ds": pd.to_datetime(
                  [
                      "2007-12-13",
                      "2008-05-31",
                      "2008-06-04",
                      "2008-06-06",
                      "2008-06-09",
                      "2008-12-13",
                      "2008-12-25",
                      "2009-01-01",
                      "2009-01-15",
                      "2009-03-20",
                      "2009-04-20",
                      "2009-05-20",
                  ]
              ),
          }
      )
      history_events_df1 = playoffs_history.iloc[:3, :].copy(deep=True)
      history_events_df2 = playoffs_history.iloc[3:6, :].copy(deep=True)
      history_events_df3 = playoffs_history.iloc[6:9, :].copy(deep=True)
      history_events_df4 = playoffs_history.iloc[9:, :].copy(deep=True)
      playoffs_future = pd.DataFrame(
          {
              "event": "playoff",
              "ds": pd.to_datetime(
                  [
                      "2008-06-10",
                      "2008-06-11",
                      "2008-12-15",
                      "2008-12-16",
                      "2009-01-26",
                      "2009-01-27",
                      "2009-06-05",
                      "2009-06-06",
                  ]
              ),
          }
      )
      future_events_df3 = playoffs_future.iloc[4:6, :].copy(deep=True)
      future_events_df4 = playoffs_future.iloc[6:8, :].copy(deep=True)
      future_events_df3["ID"] = "df1"
      future_events_df4["ID"] = "df2"
      events_input = {
          0: future_events_df3,
          1: future_events_df3,
          2: pd.concat((future_events_df3, future_events_df4)),
      }
  
      info_input = {
          0: "Testing single ts df train / single ts df test - single df events, no regressors",
          1: "Testing many ts df train / single ts df test - single df events, no regressors",
          2: "Testing many ts df train / many ts df test - many df events, no regressors",
      }
      for i in range(0, 3):
          log.debug(info_input[i])
          m = NeuralProphet(
              epochs=EPOCHS,
              batch_size=BATCH_SIZE,
              learning_rate=LR,
              trend_global_local="global",
              season_global_local="global",
          )
          m.add_events(["playoff"])
          history_df1 = m.create_df_with_events(
              df1_0, history_events_df1
          )
          history_df2 = m.create_df_with_events(
              df2_0, history_events_df2
          )
          history_df3 = m.create_df_with_events(
              df3_0, history_events_df3
          )
          history_df4 = m.create_df_with_events(
              df4_0, history_events_df4
          )
          if i == 1:
              history_df1 = pd.concat((history_df1, history_df2))
              history_df3 = history_df3
          if i == 2:
              history_df1 = pd.concat((history_df1, history_df2))
              history_df3 = pd.concat((history_df3, history_df4))
          m.fit(history_df1, freq="D")
          future = m.make_future_dataframe(
              history_df3,
              n_historic_predictions=True,
              events_df=events_input[i],
          )
          forecast = m.predict(future)
          forecast = m.predict(df=future)
          if PLOT:
              for key, df in forecast.groupby("ID"):
                  m.plot(df)
                  m.plot_parameters(df_name=key)
                  m.plot_parameters()
      # Possible errors with events
      m = NeuralProphet(
          n_forecasts=2,
          n_lags=10,
          epochs=EPOCHS,
          batch_size=BATCH_SIZE,
          learning_rate=LR,
      )
      m.add_events(["playoff"])
      m.fit(history_df1, freq="D")
      future = m.make_future_dataframe(
          history_df3,
          n_historic_predictions=True,
          events_df=future_events_df3,
      )
      log.info(
          "global model events with events df with not all IDs from original df"
      )
      future_events_df3["ID"] = "dfn"
      with pytest.raises(ValueError):
          future = m.make_future_dataframe(
              history_df3,
              n_historic_predictions=True,
              events_df=pd.concat(
                  (future_events_df3, future_events_df4)
              ),
          )
      log.info("Error - key for events not valid")
  
imports: import logging
  import math
  import os
  import pathlib
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  import torch
  from neuralprophet import NeuralProphet, df_utils, set_random_seed
  from neuralprophet.data.process import _handle_missing_data, _validate_column_name
label_desc: Use image node_id 31 for calling a global function with example usage: test_global_modeling_with_events_only() without return types