code: def get_drop_dates_and_len(df, allow_missing_num=3):
      """
      Find missing values and get records to drop
      """
      missing_num = (
          df.total.isnull()
          .astype(int)
          .groupby(df.total.notnull().astype(int).cumsum())
          .sum()
      )
      drop_missing_num = missing_num[missing_num > allow_missing_num]
      drop_datetimes = df.iloc[drop_missing_num.index].index
      drop_len = drop_missing_num.values
      return drop_datetimes, drop_len
  
imports: import pandas
  from zoo.orca import init_orca_context, stop_orca_context
  from zoo.chronos.autots.deprecated.forecast import AutoTSTrainer
  from zoo.chronos.autots.deprecated.config.recipe import *
  from zoo.chronos.autots.deprecated.preprocessing.utils import train_val_test_split
label_desc: Use image node_id 1 for calling a global function with example usage: get_drop_dates_and_len(df, allow_missing_num) and returns: drop_datetimes,  drop_len