code: def _shuffle_single(fname, extra_fn=None):
    
    records = read_records(fname)
    random.shuffle(records)
    if extra_fn is not None:
      records = extra_fn(records)
    out_fname = fname.replace(UNSHUFFLED_SUFFIX, "")
    write_records(records, out_fname)
    tf.gfile.Remove(fname)
docs: Shuffle a single file of records.
  
    Args:
      fname: a string
      extra_fn: an optional function from list of TFRecords to list of TFRecords
        to be called after shuffling.