'Return module initialized from the data in dictionary `d`.'

def from_dict(self, trans, d, **kwargs):

    type = d['type']
    assert (type in self.module_types)
    return self.module_types[type].from_dict(trans, d, **kwargs)
