original_docstring: Shuffles and writes output split.
docstring: Shuffles and writes output split.
docstring_tokens: Shuffles and writes output split .
code: def _WriteSplit(example_split: beam.pvalue.PCollection,
                  output_split_path: Text) -> beam.pvalue.PDone:
    """Shuffles and writes output split."""
    return (example_split
            # TODO(jyzhao): make shuffle optional.
            | 'Shuffle' >> beam.transforms.Reshuffle()
            # TODO(jyzhao): multiple output format.
            | 'Write' >> beam.io.WriteToTFRecord(
                os.path.join(output_split_path, DEFAULT_FILE_NAME),
                file_name_suffix='.gz'))
code_tokens: def _WriteSplit ( example_split : beam . pvalue . PCollection , output_split_path : Text ) -> beam . pvalue . PDone : return ( example_split | 'Shuffle' >> beam . transforms . Reshuffle ( ) | 'Write' >> beam . io . WriteToTFRecord ( os . path . join ( output_split_path , DEFAULT_FILE_NAME ) , file_name_suffix = '.gz' ) )
short_docstring: Shuffles and writes output split.
short_docstring_tokens: Shuffles and writes output split .
comment: """Shuffles and writes output split."""$SEP$# TODO(jyzhao): make shuffle optional.$SEP$# TODO(jyzhao): multiple output format.