def _split(self, data, separator=None):
        """ Take some data and split up based on the notion that a sentence
            looks something like:
            $x,y,z or $x,y,z*ab

            separator is for cases where there is something strange or
            non-standard as a separator between sentences.
            Without this, there is no real way to tell whether:
            $x,y,zSTUFF
            is legal or if STUFF should be stripped.
        """
        sentences = data.split('$')
        clean_sentences = []
        for item in sentences:
            cleaned_item = item.rstrip()
            if separator:
                cleaned_item = cleaned_item.rstrip(separator)
            if '*' in cleaned_item.split(',')[-1]:
                # There must be a checksum. Remove any trailing fluff:
                try:
                    first, checksum = cleaned_item.split('*')
                except __HOLE__:
                    # Some GPS data recorders have been shown to output
                    # run-together sentences (no leading $).
                    # In this case, ignore error and continue, discarding the
                    # erroneous data.
                    # TODO: try and fix the data.
                    continue
                cleaned_item = '*'.join([first, checksum[:2]])
            if cleaned_item:
                clean_sentences.append(cleaned_item)

        return clean_sentences
dataset/ETHPy150Open FishPi/FishPi-POCV---Command---Control/external/pynmea/streamer.py/NMEAStream._split