code: def log_graph(graph, name):
      """
      Log the graph on Tensorboard.
  
      Args:
          graph: the tensorflow graph to be plotted on Tensorboard
          name: the name of the graph
      """
      directory = os.path.join(
          autodist.const.DEFAULT_WORKING_DIR, "graphs"
      )
      os.makedirs(directory, exist_ok=True)
      p = os.path.join(directory, name)
      writer.FileWriter(p, graph=graph)
      logging.debug("Graph summary written to: %s" % p)
  
imports: import os
  from tensorflow.python.summary.writer import writer
  import autodist.const
  from autodist.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: log_graph(graph, name) without return types