code: def make_dataset(file_path, training, include_nbr_features, hparams):
      """Returns a `tf.data.Dataset` instance based on data in `file_path`."""
  
      def parse_example(example_proto):
          """Extracts relevant fields from the `example_proto`.
  
          Args:
            example_proto: An instance of `tf.train.Example`.
  
          Returns:
            A pair whose first value is a dictionary containing relevant features
            and whose second value contains the ground truth labels.
          """
          # The 'words' feature is a multi-hot, bag-of-words representation of the
          # original raw text. A default value is required for examples that don't
          # have the feature.
          feature_spec = {
              "words": tf.io.FixedLenFeature(
                  [hparams.max_seq_length],
                  tf.int64,
                  default_value=tf.constant(
                      0, dtype=tf.int64, shape=[hparams.max_seq_length]
                  ),
              ),
              "label": tf.io.FixedLenFeature(
                  (), tf.int64, default_value=-1
              ),
          }
          if include_nbr_features:
              for i in range(hparams.num_neighbors):
                  nbr_feature_key = "{}{}_{}".format(
                      NBR_FEATURE_PREFIX, i, "words"
                  )
                  nbr_weight_key = "{}{}{}".format(
                      NBR_FEATURE_PREFIX, i, NBR_WEIGHT_SUFFIX
                  )
                  feature_spec[nbr_feature_key] = tf.io.FixedLenFeature(
                      [hparams.max_seq_length],
                      tf.int64,
                      default_value=tf.constant(
                          0,
                          dtype=tf.int64,
                          shape=[hparams.max_seq_length],
                      ),
                  )
                  feature_spec[nbr_weight_key] = tf.io.FixedLenFeature(
                      [1], tf.float32, default_value=tf.constant([0.0])
                  )
  
          features = tf.io.parse_single_example(
              example_proto, feature_spec
          )
  
          labels = features.pop("label")
          return features, labels
  
      # If the dataset is sharded, the following code may be required:
      # filenames = tf.data.Dataset.list_files(file_path, shuffle=True)
      # dataset = filenames.interleave(load_dataset, cycle_length=1)
      dataset = load_dataset(file_path)
      if training:
          dataset = dataset.shuffle(10000)
      dataset = dataset.map(parse_example)
      dataset = dataset.batch(hparams.batch_size)
      return dataset
  
file_path: neural-structured-learning/neural_structured_learning/examples/graph_keras_mlp_cora.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import app
  from absl import flags
  from absl import logging
  import attr
  import neural_structured_learning
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: make_dataset(file_path, training, include_nbr_features, hparams) and returns: dataset, features,  labels