code: def _testcase_dataframes_with_index(
      freq: str,
      index_type: Callable,
      target: Union[str, List[str]],
      feat_dynamic_real: List[str],
      dtype=np.float32,
  ):
      dataframes = [
          pd.DataFrame.from_dict(
              {
                  "timestamp": index_type(
                      "2021-01-01 00:00:00", periods=10, freq=freq
                  ),
                  "A": 1 + np.arange(10, dtype=dtype),
                  "B": 2 + np.arange(10, dtype=dtype),
                  "C": 3 + np.arange(10, dtype=dtype),
              }
          ).set_index("timestamp"),
          pd.DataFrame.from_dict(
              {
                  "timestamp": index_type(
                      "2021-01-02 00:00:00", periods=20, freq=freq
                  ),
                  "A": 1 + np.arange(20, dtype=dtype),
                  "B": 2 + np.arange(20, dtype=dtype),
                  "C": 3 + np.arange(20, dtype=dtype),
              }
          ).set_index("timestamp"),
          pd.DataFrame.from_dict(
              {
                  "timestamp": index_type(
                      "2021-01-03 00:00:00", periods=30, freq=freq
                  ),
                  "A": 1 + np.arange(30, dtype=dtype),
                  "B": 2 + np.arange(30, dtype=dtype),
                  "C": 3 + np.arange(30, dtype=dtype),
              }
          ).set_index("timestamp"),
      ]
  
      print(type(dataframes[0].index))
  
      dataset = pandas.PandasDataset(
          dataframes,
          target=target,
          feat_dynamic_real=feat_dynamic_real,
      )
  
      expected_entries = [
          {
              "start": pd.Period(df.index[0], freq=freq),
              "target": df[target].values.transpose(),
              "feat_dynamic_real": df[
                  feat_dynamic_real
              ].values.transpose(),
          }
          for df in dataframes
      ]
  
      return dataset, expected_entries
  
imports: import io
  from typing import Callable, List, Union
  import pandas
  import numpy
  import pytest
  from gluonts.dataset import pandas
  from gluonts.testutil.equality import assert_recursively_equal
label_desc: Use image node_id 15 for calling a global function with example usage: _testcase_dataframes_with_index(freq, index_type, target, feat_dynamic_real, dtype) and returns: dataset,  expected_entries