code: def make_feature_spec(
      input_shape, max_neighbors, include_id_features=False
  ):
      """Returns a feature spec that can be used to parse tf.train.Examples.
  
      Args:
        input_shape: A list of integers representing the shape of the input feature
          and corresponding neighbor features.
        max_neighbors: The maximum neighbors per sample to be used for graph
          regularization.
        include_id_features: If `True`, include the sample ID and neighbor ID
          features.
      """
      feature_spec = {
          FEATURE_NAME: tf.io.FixedLenFeature(input_shape, tf.float32),
          LABEL_NAME: tf.io.FixedLenFeature(
              [1], tf.float32, default_value=tf.constant([0.0])
          ),
      }
      if include_id_features:
          feature_spec[ID_FEATURE_NAME] = tf.io.FixedLenFeature(
              (), tf.string, default_value=""
          )
      for i in range(max_neighbors):
          nbr_feature_key = "{}{}_{}".format(
              NBR_FEATURE_PREFIX, i, FEATURE_NAME
          )
          nbr_weight_key = "{}{}{}".format(
              NBR_FEATURE_PREFIX, i, NBR_WEIGHT_SUFFIX
          )
          feature_spec[nbr_feature_key] = tf.io.FixedLenFeature(
              input_shape, tf.float32
          )
          feature_spec[nbr_weight_key] = tf.io.FixedLenFeature(
              [1], tf.float32, default_value=tf.constant([0.0])
          )
  
          if include_id_features:
              nbr_id_key = "{}{}_{}".format(
                  NBR_FEATURE_PREFIX, i, ID_FEATURE_NAME
              )
              feature_spec[nbr_id_key] = tf.io.FixedLenFeature(
                  (), tf.string, default_value=""
              )
      return feature_spec
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  from neural_structured_learning import configs
  from research.carls import graph_regularization
  from research.carls import neighbor_cache_client
  import numpy
  import tensorflow
  from google.protobuf import text_format
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling a global function with example usage: make_feature_spec(input_shape, max_neighbors, include_id_features) and returns: feature_spec