<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _safe_db(num, den):
 """Properly handle the potential +Inf db SIR instead of raising a RuntimeWarning. """

    if den == 0:
        return np.inf
    return 10 * np.log10(num / den)