code: def _add_pred_results(
      pred_results,
      local_results,
      axis=0,
      alpha=None,
      order=1,
      alpha_ignore_na=False,
      pred_exponent=None,
      alpha_data=None,
  ):
      if pred_results[0].ndim == 1:
          df_filler = 0
      else:
          df_filler = pred_results[0].iloc[-1, :].dropna()
          df_filler[:] = 0
  
      new_locals = []
      combine_axis = pred_results[0].ndim - axis - 1
      weight = (1 - alpha) ** order
      pred_coeff = weight**pred_exponent
      for idx, (pred_result, local_result) in enumerate(
          zip(pred_results, local_results)
      ):
          local_result.fillna(df_filler, inplace=True)
          pred_result = pred_result.mul(pred_coeff).sum(axis=axis)
  
          if alpha_ignore_na:
              pred_df = (
                  pred_result * weight ** alpha_data.notna().cumsum()
              )
          else:
              weights = np.arange(1, len(local_result) + 1)
              if local_result.ndim == 2:
                  weights_df = pd.DataFrame(
                      np.repeat(
                          weights.reshape((len(local_result), 1)),
                          len(local_result.columns),
                          axis=1,
                      ),
                      columns=local_result.columns,
                      index=local_result.index,
                  )
              else:
                  weights_df = pd.Series(
                      weights, index=local_result.index
                  )
              weights_df[alpha_data.isna()] = np.nan
              weights_df.ffill(inplace=True)
              weights_df.fillna(0, inplace=True)
  
              weights_df = weight**weights_df
              pred_df = weights_df.mul(pred_result, axis=combine_axis)
  
          new_locals.append(
              local_result.add(pred_df, axis=combine_axis)
          )
      return new_locals
  
imports: from collections import namedtuple
  import numpy
  import pandas
  from ....None import opcodes
  from ....serialization.serializables import BoolField, Float64Field
  from ..aggregation import BaseDataFrameExpandingAgg
label_desc: Use image node_id 1 for calling a global function with example usage: _add_pred_results(pred_results, local_results, axis, alpha, order, alpha_ignore_na, pred_exponent, alpha_data) and returns: new_locals