def _detect_line_ending(self):
candidate_value = '<STR_LIT:\n>'<EOL>candidate_count = <NUM_LIT:0><EOL>for line_ending in UniversalCsvReader.line_endings:<EOL><INDENT>count = self._sample.count(line_ending)<EOL>if count > candidate_count:<EOL><INDENT>candidate_value = line_ending<EOL>candidate_count = count<EOL><DEDENT><DEDENT>self._formatting_parameters['<STR_LIT>'] = candidate_value<EOL>
Detects the line ending in the sample data.