code: def broadcast_globals_to_edges(
      graph, name="broadcast_globals_to_edges", num_edges_hint=None
  ):
      """Broadcasts the global features to the edges of a graph.
  
      Args:
        graph: A `graphs.GraphsTuple` containing `Tensor`s, with globals features of
          shape `[n_graphs] + global_shape`, and `N_EDGE` field of shape
          `[n_graphs]`.
        name: (string, optional) A name for the operation.
        num_edges_hint: Integer indicating the total number of edges, if known.
  
      Returns:
        A tensor of shape `[n_edges] + global_shape`, where
        `n_edges = sum(graph.n_edge)`. The i-th element of this tensor is given by
        `globals[j]`, where j is the index of the graph the i-th edge belongs to
        (i.e. is such that
        `sum_{k < j} graphs.n_edge[k] <= i < sum_{k <= j} graphs.n_edge[k]`).
  
      Raises:
        ValueError: If either `graph.globals` or `graph.n_edge` is `None`.
      """
      _validate_broadcasted_graph(graph, GLOBALS, N_EDGE)
      with tf.name_scope(name):
          return utils_tf.repeat(
              graph.globals,
              graph.n_edge,
              axis=0,
              sum_repeats_hint=num_edges_hint,
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from graph_nets import _base
  from graph_nets import graphs
  from graph_nets import utils_tf
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: broadcast_globals_to_edges(graph, name, num_edges_hint) and returns: utils_tf