code: def split_full_for_forecasting(
      df, time_column_name, grain_column_names=None, test_split=0.2
  ):
      index_name = df.index.name
  
      # Assumes that there isn't already a column called tmpindex
  
      df["tmpindex"] = df.index
  
      train_df, test_df = split_fraction_by_grain(
          df, test_split, time_column_name, grain_column_names
      )
  
      train_df = train_df.set_index("tmpindex")
      train_df.index.name = index_name
  
      test_df = test_df.set_index("tmpindex")
      test_df.index.name = index_name
  
      df.drop("tmpindex", axis=1, inplace=True)
  
      return train_df, test_df
  
file_path: MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/forecasting-github-dau/helper.py
imports: import pandas
  from azureml.core import Environment
  from azureml.core.conda_dependencies import CondaDependencies
  from azureml.train.estimator import Estimator
  from azureml.core.run import Run
  from azureml.automl.core.shared import constants
label_desc: Use image node_id 2 for calling a global function with example usage: split_full_for_forecasting(df, time_column_name, grain_column_names, test_split) and returns: train_df,  test_df