code: private static List<String> parseForSummarise(final Reader input, final ObjectMapper inputMapper,
  			Map<String, String> defaultValues,
  			TriFunction<JsonNode, List<String>, List<String>, List<String>> summariseFunction, JsonPointer basePath,
  			Map<String, Optional<JsonPointer>> fieldRelativePaths) throws IOException, CSVStreamException {
  		// This will be populated with whatever is recognised as the headers when the
  		// input is parsed, so we can return it from this function
  		final List<String> headers = new ArrayList<>();
  		JSONStream.parse(input, h -> headers.addAll(h), summariseFunction, NULL_CONSUMER, basePath, fieldRelativePaths,
  				defaultValues, inputMapper, headers);
  		return headers;
  	}
docs: Parse the given inputs to in-memory maps to allow for summarisation.
  
  @param input
  The {@link Reader} containing the inputs to be summarised.
  @param inputMapper
  The CsvMapper to use to parse the file into memory
  @param defaultValues
  A list that is either empty, signifying there are no default
  values known, or exactly the same length as each row in the CSV
  file being parsed. If the values for a field are empty/missing,
  and a non-null, non-empty value appears in this list, it will be
  substituted in when calculating the statistics.
  @param summariseFunction
  The function which will perform the summarisation
  @param basePath
  The path to go to before checking the field paths (only supports a
  single point of entry at this point in time). Set to "/" to start
  at the top of the document. If the basePath points to an array,
  each of the array elements are matched separately with the
  fieldRelativePaths. If it points to an object, the object is
  directly matched to obtain a single result row. Otherwise an
  exception is thrown.
  @param fieldRelativePaths
  The relative paths underneath the basePath to select field values
  from.
  @return The list of headers that were either overridden or found in the file
  @throws IOException
  If there is an error reading from the file
  @throws CSVStreamException
  If there is a problem processing the CSV content