code: public static void writeInstances( File targetFile, Collection<Instance> rootInstances ) throws IOException {
  
  		FileDefinition def = new FromInstances().buildFileDefinition( rootInstances, targetFile, false, true );
  		ParsingModelIo.saveRelationsFile( def, false, "\n" );
  	}
docs: Writes all the instances into a file.
  @param targetFile the file to save
  @param rootInstances the root instances (not null)
  @throws IOException if something went wrong