<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_par_contribution(self,parlist_dict=None,include_prior_results=False):
 """get a dataframe the prior and posterior uncertainty reduction as a result of some parameter becoming perfectly known Parameters parlist_dict : dict a nested dictionary-list of groups of parameters that are to be treated as perfectly known. key values become row labels in returned dataframe. If None, each adjustable parameter is sequentially treated as known and the returned dataframe has row labels for each adjustable parameter include_prior_results : bool flag to return a multi-indexed dataframe with both conditional prior and posterior forecast uncertainty estimates. Default is False Returns ------- pandas.DataFrame : pandas.DataFrame a dataframe that summarizes the parameter contribution analysis. The dataframe has index (row labels) of the keys in parlist_dict and a column labels of forecast names. The values in the dataframe are the posterior variance of the forecast conditional on perfect knowledge of the parameters in the values of parlist_dict. Varies depending on `include_prior_results`. Example ------- """

        self.log("calculating contribution from parameters")
        if parlist_dict is None:
            parlist_dict = {}#dict(zip(self.pst.adj_par_names,self.pst.adj_par_names))
            # make sure all of the adjustable pars are in the jco
            for pname in self.pst.adj_par_names:
                if pname in self.jco.col_names:
                    parlist_dict[pname] = pname
        else:
            if type(parlist_dict) == list:
                parlist_dict = dict(zip(parlist_dict,parlist_dict))

        results = {}
        names = ["base"]
        for forecast in self.prior_forecast.keys():
            pr = self.prior_forecast[forecast]
            pt = self.posterior_forecast[forecast]
            #reduce = 100.0 * ((pr - pt) / pr)
            results[(forecast,"prior")] = [pr]
            results[(forecast,"post")] = [pt]
            #results[(forecast,"percent_reduce")] = [reduce]
        for case_name,par_list in parlist_dict.items():
            if len(par_list) == 0:
                continue
            names.append(case_name)
            self.log("calculating contribution from: " + str(par_list))
            case_prior,case_post = self.__contribution_from_parameters(par_list)
            self.log("calculating contribution from: " + str(par_list))
            for forecast in case_prior.keys():
                pr = case_prior[forecast]
                pt = case_post[forecast]
                #reduce = 100.0 * ((pr - pt) / pr)
                results[(forecast, "prior")].append(pr)
                results[(forecast, "post")].append(pt)
                #results[(forecast, "percent_reduce")].append(reduce)

        df = pd.DataFrame(results,index=names)
        #base = df.loc["base",df.columns.get_level_values(1)=="post"]
        #df = 1.0 - (df.loc[:,df.columns.get_level_values(1)=="post"] / base)

        self.log("calculating contribution from parameters")
        if include_prior_results:
            return df
        else:
            df = df.xs("post", level=1, drop_level=True, axis=1)
            return df