docs: def compact_view(self, merged_data, selected_meta, reference_no):
          """
          Creates and returns the compact view where the index of the dataframe is a multi index of the selected metadata.
          Side effect: Alters the merged_data parameter
  
          :param merged_data: The merged data that is to be used to create the compact view
          :param selected_meta: The selected metadata to create the multi index
          :param reference_no: The reference number that the metadata are going to be taken
          :return: Returns the multi-indexed dataframe w.r.t. the selected metadata
  
          """
          meta_names = list(selected_meta)
          meta_index = []
  
          for x in meta_names:
              meta_index.append(self.all_meta_data.ix[merged_data.index.get_level_values(reference_no)][x].values)
          meta_index = np.asarray(meta_index)
          multi_meta_index = pd.MultiIndex.from_arrays(meta_index, names=meta_names)
          merged_data.index = multi_meta_index
          return merged_data