def parse_close(data):
    length = len(data)
    if length == 0:
        return 1005, ''
    elif length == 1:
        raise ProtocolError("Close frame too short")
    else:
        code, = unpack('!H', data[:2])
        if not (code in CLOSE_CODES or 3000 <= code < 5000):
            raise ProtocolError("Invalid status code for websocket")
        reason = data[2:].decode('utf-8')
        return code, reason
_setup_macros_dict must not overwrite the
dataset/ETHPy150Open quantmind/pulsar/pulsar/utils/websocket.py/parse_close--crossover with--dataset/ETHPy150Open nalourie/django-macros/build/lib/macros/tests.py/MacrosTests.test_set__setup_macros_dict_doesnt_overwrite