code: def make_multi_index_dataframe(
      n_instances=50, n_columns=3, n_timepoints=20
  ):
      """Generate example multi-index DataFrame.
  
      Parameters
      ----------
      n_instances : int
          Number of instances.
      n_columns : int
          Number of columns (series) in multi-indexed DataFrame.
      n_timepoints : int
          Number of timepoints per instance-column pair.
  
      Returns
      -------
      mi_df : pd.DataFrame
          The multi-indexed DataFrame with
          shape (n_instances*n_timepoints, n_column).
      """
      # Make long DataFrame
      long_df = generate_example_long_table(
          num_cases=n_instances,
          series_len=n_timepoints,
          num_dims=n_columns,
      )
      # Make Multi index DataFrame
      mi_df = long_df.set_index(["case_id", "reading_id"]).pivot(
          columns="dim_id"
      )
      mi_df.columns = _make_column_names(n_columns)
      return mi_df
  
file_path: sktime/sktime/datasets/_data_io.py
imports: import os
  import shutil
  import tempfile
  import zipfile
  from urllib.request import urlretrieve
  import numpy
  import pandas
  from sktime.datasets._readers_writers.ts import load_from_tsfile
  from sktime.datasets._readers_writers.utils import _alias_mtype_check
  from sktime.datatypes import convert
  from sktime.datatypes._panel._convert import _make_column_names
label_desc: Use image node_id 8 for calling a global function with example usage: make_multi_index_dataframe(n_instances, n_columns, n_timepoints) and returns: mi_df