code: def convert_dask_to_pandas(obj):
      """Convert dask DataFrame to pandas DataFrame, preserving MultiIndex.
  
      Parameters
      ----------
      obj : pandas.DataFrame
  
      Returns
      -------
      dask DataFrame
          MultiIndex levels 0 .. -1 of X are converted to columns of name
          __index__[indexname], where indexname is name of multiindex level,
          or the integer index if the level has no name
          other columns and column names are identical to those of X
      """
      obj = obj.compute()
  
      def mi_name(x):
          return x.split("__index__")[1]
  
      def mi_names(names):
          new_names = [mi_name(x) for x in names]
          for i, name in enumerate(new_names):
              if name == str(i):
                  new_names[i] = None
          return new_names
  
      multi_cols = get_mi_cols(obj)
  
      # if has multi-index cols, move to pandas MultiIndex
      if len(multi_cols) > 0:
          obj = obj.set_index(multi_cols)
  
          names = obj.index.names
          new_names = mi_names(names)
          new_names = new_names
  
          obj.index.names = new_names
  
      return obj
  
imports: import pandas
  from sktime.datatypes._common import _req
  from sktime.datatypes._common import _ret
label_desc: Use image node_id 3 for calling a global function with example usage: convert_dask_to_pandas(obj) and returns: obj, x, new_names