code: def make_missing_neighbor_inputs(
      neighbor_config, inputs, weight_dtype=tf.float32
  ):
      """Makes additional inputs for neighbor features if necessary.
  
      Args:
        neighbor_config: An instance of `configs.GraphNeighborConfig` specifying the
          number of neighbors and how neighbor features should be named.
        inputs: Dictionary of input tensors that may be missing neighbor features.
          The keys are the features names. See `utils.unpack_neighbor_features` for
          expected names of neighbor features and weights.
        weight_dtype: `tf.Dtype` for neighbors weights. Defaults to `tf.float32`.
  
      Returns:
        A dictionary of neighbor feature and weight tensors that do not already
        exist in `inputs`. The keys are specified according to `neighbor_config`.
      """
      existing_feature_names = set(inputs.keys())
      neighbor_inputs = {}
      for i in range(
          neighbor_config.max_neighbors
      ):  # For each potential neighbor.
          # Weight of the neighbor.
          weight_name = "{}{}{}".format(
              neighbor_config.prefix, i, neighbor_config.weight_suffix
          )
          if weight_name not in existing_feature_names:
              neighbor_inputs[weight_name] = tf.keras.Input(
                  (1,), dtype=weight_dtype, name=weight_name
              )
          # For inputs without existing neighbor features, replicate them.
          for feature_name, tensor in inputs.items():
              if feature_name.startswith(neighbor_config.prefix):
                  continue
              neighbor_feature_name = "{}{}_{}".format(
                  neighbor_config.prefix, i, feature_name
              )
              if neighbor_feature_name not in existing_feature_names:
                  neighbor_inputs[
                      neighbor_feature_name
                  ] = tf.keras.Input(
                      tensor.shape[1:],
                      batch_size=tensor.shape[0],
                      dtype=tensor.dtype,
                      name=neighbor_feature_name,
                      ragged=isinstance(tensor, tf.RaggedTensor),
                      sparse=isinstance(tensor, tf.sparse.SparseTensor),
                  )
      return neighbor_inputs
  
file_path: neural-structured-learning/neural_structured_learning/keras/layers/neighbor_features.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import attr
  import neural_structured_learning.configs
  from neural_structured_learning.lib import utils
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: make_missing_neighbor_inputs(neighbor_config, inputs, weight_dtype) and returns: neighbor_inputs