code: def display_graph(graph: jraph.GraphsTuple):
      """Prints the nodes of the graph representing Conway's game of life."""
      size = int(np.sqrt(np.sum(graph.n_node)))
  
      def _display_node(node):
          if node == 1.0:
              return "x"
          else:
              return " "
  
      nodes = graph.nodes.copy()
      output = "\n".join(
          "".join(
              _display_node(nodes[i * size + j][0]) for j in range(size)
          )
          for i in range(size)
      )
      print("-" * size + "\n" + output)
  
file_path: jraph/jraph/examples/game_of_life.py
imports: import time
  from absl import app
  import haiku
  import jax
  import jax.numpy
  import jraph
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: display_graph(graph) and returns: str, str