code: def hist_sum(x, hist_name: str = ""):
      """Return sum of histograms
  
      Usage: df['hists'].apply(hist_sum) ; series.apply(hist_sum)
  
      :param pd.Series x: pandas series to extract histogram list from.
      :param str hist_name: name of column to extract histograms from. needs to be set with axis=1 (optional)
      :return: sum histogram
      """
      assert isinstance(x, pd.Series)
      if len(hist_name) > 0 and hist_name in x:
          hist_list = x[hist_name]
      else:
          hist_list = x.values
          if len(hist_name) == 0:
              hist_name = "histogram"
  
      if len(hist_list) == 0:
          raise ValueError("List of input histograms is empty.")
  
      # initialize
      o = {hist_name: None}
  
      # basic checks
      all_hist = all(
          isinstance(hist, COMMON_HIST_TYPES) for hist in hist_list
      )
      if not all_hist:
          return pd.Series(o)
  
      similar = check_similar_hists(hist_list)
      if not similar:
          return pd.Series(o)
  
      h_sum = np.sum(hist_list)
      o[hist_name] = h_sum
      return pd.Series(o)
  
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 14 for calling a global function with example usage: hist_sum(x, hist_name) and returns: pd, pd, pd