code: def _reformat_dataframes_for_plots(
      data: List[Union[pd.Series, pd.DataFrame]],
      labels_suffix: List[str],
  ) -> List[pd.DataFrame]:
      """Take the input list of dataframes (assuming all dataframes have the same columns)
      and converts them into a list of new dataframes with each new dataframe containing
      the same column from all of the input dataframe.
  
      e.g. 1
      If input list has 2 dataframes D1 and D2 with columns A, B, and C then the
      output will be a list of 3 dataframes with 2 columns each
          Output dataframe 1 containing D1.A, D2.A
          Output dataframe 2 containing D1.B, D2.B
          Output dataframe 3 containing D1.C, D2.C
  
      e.g. 2
      If the input list has series, they are just concatenated together to produce one
      output dataframe.
  
      Parameters
      ----------
      data : List[Union[pd.Series, pd.DataFrame]]
          Input list of dataframes or series
      labels_suffix : List[str]
          The suffix to use for the output dataframes column names.
          Must be the same length as the number of input dataframes
  
          In the example above, if suffix is ["original", "transformed"], then the
              Output dataframe 1 will have columns ["A (original)", "A (transformed)"]
              Output dataframe 2 will have columns ["B (original)", "B (transformed)"]
              Output dataframe 2 will have columns ["C (original)", "C (transformed)"]
  
      Returns
      -------
      List[pd.DataFrame]
          Output list of dataframes
  
      Raises
      ------
      ValueError
          When the number of labels provided does not match the number of input dataframes
      """
      num_labels = len(labels_suffix)
      num_input_dfs = len(data)
      if num_labels != num_input_dfs:
          raise ValueError(
              f"Number of labels provided ({num_labels}) does not match the number of input "
              "dataframes ({num_input_dfs})"
          )
  
      cols = pd.DataFrame(data[0]).columns
  
      data = pd.concat(data, axis=1)
      output = []
      for col in cols:
          temp = pd.DataFrame(data[col])
          column_names = [
              f"{col} ({suffix})" for suffix in labels_suffix
          ]
          temp.columns = column_names
          output.append(temp)
  
      return output
  
imports: from math import ceil
  from typing import Any, Dict, List, Optional, Tuple, Union
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import pandas
  import plotly.express
  import plotly.graph_objects
  import plotly.io
  from plotly.colors import DEFAULT_PLOTLY_COLORS
  from plotly.subplots import make_subplots
  from scipy.fft import fft, fftfreq
  from scipy.signal import periodogram
  from statsmodels.graphics.gofplots import qqplot
  from statsmodels.tsa.seasonal import STL, seasonal_decompose
  from statsmodels.tsa.stattools import acf, ccf, pacf
  from pycaret.internal.logging import get_logger
  from pycaret.utils.generic import _resolve_dict_keys
  from pycaret.utils.time_series import TSAllowedPlotDataTypes
label_desc: Use image node_id 18 for calling a global function with example usage: _reformat_dataframes_for_plots(data, labels_suffix) and returns: output