from typing import Set
from typing import Dict
from typing import Optional
import math


def compute_minimum(open_set: Set[str], f_scores: Dict[str, float]) -> Optional[str]:
    """Compute the node_id in open_set with the minimum f_score"""
    min_id: Optional[str] = None
    min_f_score = math.inf
    for identifier in open_set:
        f_score = f_scores[identifier]
        if f_score < min_f_score:
            min_id = identifier
            min_f_score = f_score
    return min_id