def from_dict(cls, strat): hm = HorseModel.from_dict(strat['hm']) return cls(horse_model=hm, **strat['risk'])