def METHOD_NAME(
    rules: List[PolymorphicRule],
) -> List[Dict[str, Union[List[str], str, float, None]]]:
    formatted_rules = []
    for rule in rules:
        rule_type = get_rule_type(rule)
        if (sampling_value := get_sampling_value(rule)) is not None:
            value_type, value = sampling_value
            formatted_rules.append(
                {
                    "id": rule["id"],
                    "type": rule_type.value if rule_type else "unknown_rule_type",
                    "samplingValue": {"type": value_type, "value": value},
                    **_extract_info_from_rule(rule_type, rule),  # type:ignore
                }
            )
    return formatted_rules  # type:ignore