code: def _add_lagged_pandas_columns(df, cols, lags, drop_na):
      """Append a lag columns.
  
      Parameters
      ----------
      df : pd.DataFrame
          Data to be lagged.
      cols : str | List[str]
          Column name / names.
      lags : int | List[int]
          The amount of lag for each col.
      drop_na : bool
          Whether or not to remove rows that contain NA values.
  
      Returns
      -------
      pd.DataFrame
          Dataframe with concatenated lagged cols.
      """
  
      cols = as_list(cols)
  
      # Indexes are not supported as pandas column names may be
      # integers themselves, introducing unexpected behaviour
      if not all([col in df.columns.values for col in cols]):
          raise KeyError("The column does not exist")
  
      combos = (
          df[col].shift(-lag).rename(col + str(lag))
          for col in cols
          for lag in lags
      )
  
      answer = pd.concat([df, *combos], axis=1)
  
      # Remove rows that contain NA values when drop_na is truthy
      if drop_na:
          answer = answer.dropna()
  
      return answer
  
file_path: scikit-lego/sklego/pandas_utils.py
imports: import datetime
  import inspect
  from functools import partial, wraps
  import numpy
  import pandas
  from scipy.ndimage import shift
  from sklego.common import as_list
label_desc: Use image node_id 6 for calling a global function with example usage: _add_lagged_pandas_columns(df, cols, lags, drop_na) and returns: answer