def _set_default_rated_power(
    power_rated: float, subcategory_id: int, type_id: int
) -> float:
    """Set the default rated power for semiconductors.

    :param power_rated: the current rated power.
    :param subcategory_id: the subcategory ID of the semiconductor with missing
        defaults.
    :param type_id: the type ID of the semiconductor with missing defaults.
    :return: _power_rated
    :rtype: float
    """
    if power_rated > 0.0:
        return power_rated

    try:
        return {
            2: {
                4: 1000.0,
            },
            3: {
                1: 0.5,
                2: 100.0,
            },
            6: {
                1: 0.5,
            },
            7: {
                1: 100.0,
            },
            8: {
                2: 1.0,
            },
        }[subcategory_id][type_id]
    except KeyError:
        return 0.0