<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def summary(self, h):
 """ Summarize the results for each model for h steps of the algorithm Parameters h : int How many steps to run the aggregating algorithm on Returns - pd.DataFrame of losses for each model """

        _, losses, _ = self.run(h=h)
        df = pd.DataFrame(losses)
        df.index = ['Ensemble'] + self.model_names
        df.columns = [self.loss_name]
        return df