@classmethod
def _parse_data(cls, data):
    """
        Try to read a packet from the start of data, returning
        (command/report code, packet_data, remaining_data)
        or raising InvalidPacket or MoreDataRequired
        """
    if len(data) < 2:
        raise cls.MoreDataRequired
    command = ord(data[0])
    plen = ord(data[1])
    if plen > cls.MAX_PACKET_DATA_LENGTH:
        raise cls.InvalidPacket('length value too large')
    if len(data) < plen + 4:
        raise cls.MoreDataRequired
    crc = cls.get_crc(data[:2 + plen])
    pcrc = ord(data[2 + plen]) + (ord(data[3 + plen]) << 8)
    if crc != pcrc:
        raise cls.InvalidPacket("CRC doesn't match")
    return command, data[2:2 + plen], data[4 + plen:]
