def calculate_insert_temperature(contact_gauge: int, current_operating: float) -> float:
    """Calculate the insert temperature.

    Operating current can be passed as float or integer:
    >>> calculate_insert_temperature(1, 16, 0.05)
    0.0010736063482992093
    >>> calculate_insert_temperature(1, 16, 5)
    5.380777957087587

    A KeyError is raised if the contact gauge are unknown:
    >>> calculate_insert_temperature(1, 6, 0.05)
    Traceback (most recent call last):
        ...
    KeyError: 6

    A TypeError is raised if the operating current is passed as a string:
    >>> calculate_insert_temperature(1, 16, '0.05')
    Traceback (most recent call last):
        ...
    TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'float'

    :param contact_gauge: the standard gauge of the connection contact.
    :param current_operating: the nominal current carried by each
        connection contact.
    :return: _temperature_rise; the calculated temperature of the connection's
        insert.
    :rtype: float
    :raise: KeyError when an unknown contact gauge is passed.
    :raise: TypeError when the operating current is passed as a string.
    """
    _dic_factors = {12: 0.1, 16: 0.274, 20: 0.64, 22: 0.989, 26: 2.1}

    _fo = _dic_factors[contact_gauge]

    return _fo * current_operating**1.85