code: def test_dataframe(testCase):
      """Test apply the transformer to dataframe."""
      s = pd.Series(
          testCase["s"],
          pd.date_range(
              start="2017-1-1", periods=len(testCase["s"]), freq="D"
          ),
      )
      df = pd.concat([s.rename("A"), s.rename("B")], axis=1)
      model = testCase["model"](**testCase["params"])
      if testCase["pandas_bug"] and (
          parse(pd.__version__) < parse("0.25")
      ):
          with pytest.raises(PandasBugError):
              if isinstance(model, _TrainableModel):
                  t = model.fit_transform(df)
              else:
                  t = model.transform(df)
  
      else:
          if isinstance(model, _TrainableModel):
              t = model.fit_transform(df)
          else:
              t = model.transform(df)
          if not isinstance(testCase["t"], dict):
              t_true = pd.Series(testCase["t"], index=s.index)
              t_true = pd.concat(
                  [t_true.rename("A"), t_true.rename("B")], axis=1
              )
          else:
              t_true = pd.DataFrame(testCase["t"], index=s.index)
              t_true = pd.concat(
                  [
                      t_true.rename(
                          columns={
                              col: "A_{}".format(col)
                              for col in t_true.columns
                          }
                      ),
                      t_true.rename(
                          columns={
                              col: "B_{}".format(col)
                              for col in t_true.columns
                          }
                      ),
                  ],
                  axis=1,
              )
          if sys.version_info[1] >= 6:
              pd.testing.assert_frame_equal(
                  t, t_true, check_dtype=False
              )
          else:
              pd.testing.assert_frame_equal(
                  t.sort_index(axis=1),
                  t_true.sort_index(axis=1),
                  check_dtype=False,
              )
  
file_path: adtk/tests/test_transformer1d.py
imports: import sys
  import pandas
  import pytest
  from packaging.version import parse
  import adtk.transformer
  from adtk._base import _TrainableModel
  from adtk._utils import PandasBugError
label_desc: Use image node_id 3 for calling a global function with example usage: test_dataframe(testCase) without return types