<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unstuff(packet):
 """ Remove byte stuffing from a TSIP packet. :param packet: TSIP packet with byte stuffing. The packet must already have been stripped or `ValueError` will be raised. :type packet: Binary string. :return: Packet without byte stuffing. """


    if is_framed(packet):
        raise ValueError('packet contains leading DLE and trailing DLE/ETX')
    else:
        return packet.replace(CHR_DLE + CHR_DLE, CHR_DLE)