import typing


def _tdec(code: str, unit: typing.Optional[str] = 'C') -> typing.Optional[str]:
    """
    Translates a 4-digit decimal temperature representation

    Ex: 1045 -> -4.5°C    0237 -> 23.7°C
    """
    if not code:
        return None
    ret = f"{'-' if code[0] == '1' else ''}{int(code[1:3])}.{code[3]}"
    if unit:
        ret += f'°{unit}'
    return ret