def METHOD_NAME(rules: Dict, variables: Dict) -> List[rt.Rule]:
    rule_list = []
    rule_names = []
    if variables is None:
        variables = {}
    for rule in rules:
        name = rule.get("name")
        if name is None:
            raise RulenameEmptyException("Rule name not provided")
        name = substitute_variables(name, variables)
        if name == "":
            raise RulenameEmptyException("Rule name cannot be an empty string")
        if name in rule_names:
            raise RulenameDuplicateException(
                f"Rule with name {name} defined multiple times"
            )
        rule_names.append(name)
        if "throttle" in rule:
            throttle = rt.Throttle(
                once_within=rule["throttle"].get("once_within", None),
                once_after=rule["throttle"].get("once_after", None),
                group_by_attributes=rule["throttle"]["group_by_attributes"],
            )
        else:
            throttle = None
        rule = rt.Rule(
            name=name,
            condition=parse_condition(rule["condition"]),
            actions=parse_actions(rule),
            enabled=rule.get("enabled", True),
            throttle=throttle,
            uuid=str(uuid.uuid4()),
        )
        if rule.enabled:
            rule_list.append(rule)
    return rule_list