code: def convert_Panel_to_Hierarchical(
      obj, store=None, return_to_mtype=False
  ):
      """Convert panel to a single-panel hierarchical object.
  
      Adds a dimensions to the panel to obtain a 3-level MultiIndex, 1 level is added.
  
      Assumes input is conformant with one of the Panel mtypes.
      This method does not perform full mtype checks, use mtype or check_is_mtype for
      checks.
  
      Parameters
      ----------
      obj: an object of scitype Panel.
      store: dict, optional
          converter store for back-conversion
      return_to_mtype: bool, optional (default=False)
          if True, also returns the str of the mtype converted to
  
      Returns
      -------
      returns a data container of mtype pd_multiindex_hier
      """
      obj_df = convert_to(
          obj, to_type="pd-multiindex", as_scitype="Panel"
      )
      obj_df = obj_df.copy()
      obj_df["__level2"] = 0
      obj_df = obj_df.set_index(["__level2"], append=True)
      obj_df = obj_df.reorder_levels([2, 0, 1])
  
      if return_to_mtype:
          return obj_df, "pd_multiindex_hier"
      else:
          return obj_df
  
file_path: sktime/sktime/datatypes/_series_as_panel/_convert.py
imports: import numpy
  import pandas
  from sktime.datatypes import convert_to, scitype
label_desc: Use image node_id 5 for calling a global function with example usage: convert_Panel_to_Hierarchical(obj, store, return_to_mtype) and returns: obj_df,  str, obj_df