def _split(sentence):
    """
    Returns the split version of an NMEA sentence, minus header
    and checksum.

    >>> _split(b"$GPGGA,spam,eggs*00")
    [b'GPGGA', b'spam', b'eggs']

    @param sentence: The NMEA sentence to split.
    @type sentence: C{bytes}
    """
    if sentence[-3:-2] == b"*": # Sentence with checksum
        return sentence[1:-3].split(b',')
    elif sentence[-1:] == b"*": # Sentence without checksum
        return sentence[1:-1].split(b',')
    else:
        raise base.InvalidSentence("malformed sentence %s" % (sentence,))

    Returns the split version of an NMEA sentence, minus header
    and checksum.

    >>> _split(b"$GPGGA,spam,eggs*00")
    [b'GPGGA', b'spam', b'eggs']

    @param sentence: The NMEA sentence to split.
    @type sentence: C{bytes}
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/positioning/nmea.py