<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_hdf(cls, filename, path=''):
 """ Loads PopulationSet from file """

        with pd.HDFStore(filename) as store:
            models = []
            types = []
            for k in store.keys():
                m = re.search('/(\S+)/stars', k)
                if m:
                    models.append(m.group(1))
                    types.append(store.get_storer(m.group(0)).attrs.poptype)
        poplist = []
        for m,t in zip(models,types):
            poplist.append(t().load_hdf(filename, path='{}/{}'.format(path,m)))

        return cls(poplist)