def _set_default_resistance(resistance: float, subcategory_id: int) -> float:
    """Set the default resistance for resistors.

    :param resistance: the current resistance.
    :param subcategory_id: the subcategory ID of the resistor with missing defaults.
    :return: _resistance
    :rtype: float
    """
    if resistance > 0.0:
        return resistance
    return {
        1: 1000000.0,
        2: 1000000.0,
        3: 100.0,
        4: 1000.0,
        5: 100000.0,
        6: 5000.0,
        7: 5000.0,
        8: 1000.0,
        9: 5000.0,
        10: 50000.0,
        11: 5000.0,
        12: 5000.0,
        13: 200000.0,
        14: 200000.0,
        15: 200000.0,
    }[subcategory_id]