code: def expanding_hist(df, shift: int = 1, *args, **kwargs):
      """Apply expanding histogram sum
  
      Function can be used by ApplyFunc module.
  
      :param pd.DataFrame df: input pandas dataframe with column of histograms
      :param int shift: shift of dataframe, default is 1 (optional)
      :param args: args passed on to hist_sum function
      :param kwargs: kwargs passed on to hist_sum function
      :return: dataframe with expanding hist_sum results
      """
      return expand(df, shift=shift).apply(
          hist_sum, axis=1, args=args, **kwargs
      )
  
imports: import numpy
  import pandas
  from numpy.lib.stride_tricks import as_strided
  from scipy import linalg, stats
  from scipy.stats import linregress, norm
  from popmon.analysis.hist_numpy import check_similar_hists, get_consistent_numpy_2dgrids, get_consistent_numpy_entries, set_2dgrid
  from popmon.hist.hist_utils import COMMON_HIST_TYPES, is_numeric
  from popmon.stats.numpy import probability_distribution_mean_covariance
label_desc: Use image node_id 12 for calling a global function with example usage: expanding_hist(df, shift) and returns: expand