code: def set_zero_node_features(
      graph, node_size, dtype=tf.float32, name="set_zero_node_features"
  ):
      """Completes the node state of a graph.
  
      Args:
        graph: A `graphs.GraphsTuple` with a `None` edge state.
        node_size: (int) the dimension for the created node features.
        dtype: (tensorflow type) the type for the created nodes features.
        name: (string, optional) A name for the operation.
  
      Returns:
        The same graph but for the node field, which is a `Tensor` of shape
        `[number_of_nodes, node_size]`  where `number_of_nodes = sum(graph.n_node)`,
        with type `dtype`, filled with zeros.
  
      Raises:
        ValueError: If the `NODES` field is not None in `graph`.
        ValueError: If `node_size` is None.
      """
      if graph.nodes is not None:
          raise ValueError(
              "Cannot complete node state if the graph already has node features."
          )
      if node_size is None:
          raise ValueError("Cannot complete nodes with None node_size")
      with tf.name_scope(name):
          n_nodes = tf.reduce_sum(graph.n_node)
          return graph._replace(
              nodes=tf.zeros(shape=[n_nodes, node_size], dtype=dtype)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import functools
  from absl import logging
  from graph_nets import graphs
  from graph_nets import utils_np
  import six
  from six.moves import range
  import tensorflow
  import tree
label_desc: Use image node_id 22 for calling a global function with example usage: set_zero_node_features(graph, node_size, dtype, name) and returns: graph