Returns ProfileCollection

def _parse_sensor_data(self, obs_el, sensor_info):
        """
        Returns ProfileCollection
        """
        data_array = obs_el.content

        # get column defs
        data_record = data_array.elementType.content
        columns = []
        for f in data_record.field:
            columns.append(f)

        # get more information on sensor cols
        sensor_cols = defaultdict(list)
        # sensor_vals = defaultdict(list)

        sensor_rec = data_record.get_by_name("sensor")
        for sendata in sensor_rec.content.item:
            if sendata.content is None:
                continue

            for f in sendata.content.field:
                sensor_cols[sendata.name].append(f)

        # @TODO deduplicate
        # decimalSeparator = data_array.encoding.decimalSeparator
        tokenSeparator = data_array.encoding.tokenSeparator
        blockSeparator = data_array.encoding.blockSeparator
        # collapseWhiteSpaces = data_array.encoding.collapseWhiteSpaces

        data_values = data_array.values
        lines = [x for x in data_values.split(blockSeparator) if x != ""]

        # profile cacher!
        profile_cache = ProfileCache()

        for row in lines:
            values = row.split(tokenSeparator)

            # skey = None
            i = 0
            cur_time = None
            # cur_qual = None

            for c in columns:

                if (
                    isinstance(c.content, Time)
                    and c.content.definition
                    == "http://www.opengis.net/def/property/OGC/0/SamplingTime"
                ):
                    cur_time = parser.parse(values[i])
                    i += 1

                    if len(c.quality):
                        # @TODO: do some quality constraint checks
                        i += len(c.quality)
                        # for qua in c.quality:

                elif isinstance(c.content, DataChoice) and c.name == "sensor":
                    sensor_key = values[i]
                    i += 1

                    sensor_dr = c.content.get_by_name(sensor_key).content
                    sensor_info_ = sensor_info[sensor_key]
                    parsed, nc = self._parse_sensor_record(
                        sensor_dr, sensor_info_, values[i:]
                    )

                    # turn these into Points/Members
                    for rec in parsed:
                        # calc a Z value from rec/sensor and build point
                        point, members = self._build_obs_point(
                            sensor_info_, rec
                        )

                        # add to profile
                        profile_cache.add_obs(
                            sensor_info_, cur_time, point, members
                        )

                    i += nc

        return profile_cache.get_collections()