code: def main(unused_argv):
      start_time = time.time()
  
      # Parses Cora content into TF Examples.
      train_examples, test_examples = parse_cora_content(
          FLAGS.input_cora_content, FLAGS.train_percentage
      )
  
      graph = graph_utils.read_tsv_graph(FLAGS.input_cora_graph)
      graph_utils.add_undirected_edges(graph)
  
      # Joins 'train_examples' with 'graph'. 'test_examples' are used as *unlabeled*
      # neighbors for transductive learning purpose. In other words, the labels of
      # test_examples are not used.
      with tf.io.TFRecordWriter(FLAGS.output_train_data) as writer:
          for merged_example in _join_examples(
              train_examples, test_examples, graph, FLAGS.max_nbrs
          ):
              writer.write(merged_example.SerializeToString())
  
      logging.info(
          "Output training data written to TFRecord file: %s.",
          FLAGS.output_train_data,
      )
  
      # Writes 'test_examples' out w/o joining with the graph since graph
      # regularization is used only during training, not testing/serving.
      with tf.io.TFRecordWriter(FLAGS.output_test_data) as writer:
          for example in six.itervalues(test_examples):
              writer.write(example.SerializeToString())
  
      logging.info(
          "Output test data written to TFRecord file: %s.",
          FLAGS.output_test_data,
      )
      logging.info(
          "Total running time: %.2f minutes.",
          (time.time() - start_time) / 60.0,
      )
  
file_path: neural-structured-learning/neural_structured_learning/examples/preprocess/cora/preprocess_cora_dataset.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import random
  import time
  from absl import app
  from absl import flags
  from absl import logging
  from neural_structured_learning.tools import graph_utils
  import six
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: main(unused_argv) without return types