def _parse_sensor_data(self, obs_el, sensor_info):
data_array = obs_el.content<EOL>data_record = data_array.elementType.content<EOL>columns = []<EOL>for f in data_record.field:<EOL><INDENT>columns.append(f)<EOL><DEDENT>sensor_cols = defaultdict(list)<EOL>sensor_rec = data_record.get_by_name("<STR_LIT>")<EOL>for sendata in sensor_rec.content.item:<EOL><INDENT>if sendata.content is None:<EOL><INDENT>continue<EOL><DEDENT>for f in sendata.content.field:<EOL><INDENT>sensor_cols[sendata.name].append(f)<EOL><DEDENT><DEDENT>tokenSeparator = data_array.encoding.tokenSeparator<EOL>blockSeparator = data_array.encoding.blockSeparator<EOL>data_values = data_array.values<EOL>lines = [x for x in data_values.split(blockSeparator) if x != "<STR_LIT>"]<EOL>profile_cache = ProfileCache()<EOL>for row in lines:<EOL><INDENT>values = row.split(tokenSeparator)<EOL>i = <NUM_LIT:0><EOL>cur_time = None<EOL>for c in columns:<EOL><INDENT>if (<EOL>isinstance(c.content, Time)<EOL>and c.content.definition<EOL>== "<STR_LIT>"<EOL>):<EOL><INDENT>cur_time = parser.parse(values[i])<EOL>i += <NUM_LIT:1><EOL>if len(c.quality):<EOL><INDENT>i += len(c.quality)<EOL><DEDENT><DEDENT>elif isinstance(c.content, DataChoice) and c.name == "<STR_LIT>":<EOL><INDENT>sensor_key = values[i]<EOL>i += <NUM_LIT:1><EOL>sensor_dr = c.content.get_by_name(sensor_key).content<EOL>sensor_info_ = sensor_info[sensor_key]<EOL>parsed, nc = self._parse_sensor_record(<EOL>sensor_dr, sensor_info_, values[i:]<EOL>)<EOL>for rec in parsed:<EOL><INDENT>point, members = self._build_obs_point(<EOL>sensor_info_, rec<EOL>)<EOL>profile_cache.add_obs(<EOL>sensor_info_, cur_time, point, members<EOL>)<EOL><DEDENT>i += nc<EOL><DEDENT><DEDENT><DEDENT>return profile_cache.get_collections()<EOL>
Returns ProfileCollection