@classmethod
    def _rrule_from_dict(cls, rrule):
        kwargs = rrule.copy()
        for key, value in rrule.items():
            # Allow constants in datetutil.rrule to be passed as strings
            if isinstance(value, str) and hasattr(dateutil.rrule, value):
                kwargs[key] = getattr(dateutil.rrule, value)

        dstart = kwargs.get('dtstart')
        if isinstance(dstart, str):
            kwargs['dtstart'] = dateutil.parser.parse(dstart)
        return dateutil.rrule.rrule(**kwargs)
dataset/ETHPy150Open ottogroup/palladium/palladium/util.py/RruleThread._rrule_from_dict/original