Writes examples to a file at output_path with type file_type.

CAVEAT: This function is not recommended for writing large datasets, since it will loop through examples and perform write operation sequentially.

examples List of tf.train.Example or tf.train.SequenceExample.
output_path Output path for the dataset.
file_type A string indicating the file format, could be: 'tfrecord', 'tfrecords', 'tfrecord_compressed', 'tfrecords_gzip', 'riegeli'. The string is case insensitive.