message: use with when calling TFRecordWriter
  TFRecordWriter supports __enter__ and __exit__ .
  Calling it through with is more pythonic and does cleanup in case something throws an uncaught exception.
diff: @@ -52,7 +52,7 @@ def convert_to(data_set, name):
  filename = os.path.join(FLAGS.directory, name + '.tfrecords')
  print('Writing', filename)
  - writer = tf.python_io.TFRecordWriter(filename)
  + with tf.python_io.TFRecordWriter(filename) as writer:
  for index in range(num_examples):
  image_raw = images[index].tostring()
  example = tf.train.Example(features=tf.train.Features(feature={
  @@ -62,7 +62,6 @@ def convert_to(data_set, name):
  'label': _int64_feature(int(labels[index])),
  'image_raw': _bytes_feature(image_raw)}))
  writer.write(example.SerializeToString())
  - writer.close()
  def main(unused_argv):
  