@staticmethod
def load_from_dict(d):
    """
        Creates a Rule from the dictionary generated by to_dict function
        :param d: a dictionary containing all slot of the Rule
        :return: a Rule object
        """
    output = eval(d['type'])()
    for slot in output.__slots__:
        output.__setattr__(slot, d[slot])
    return output
