code: def plot_mxboard(block, logdir="./logs"):
      """Plot network to visualize internal structures.
  
      Parameters
      ----------
      block : mxnet.gluon.HybridBlock
          A hybridizable network to be visualized.
      logdir : str
          The directory to save.
  
      """
      try:
          from mxboard import SummaryWriter
      except ImportError:
          print(
              "mxboard is required. Please install via `pip install mxboard` "
              + "or refer to https://github.com/awslabs/mxboard."
          )
          raise
      data = mx.sym.var("data")
      sym = block(data)
      if isinstance(sym, tuple):
          sym = mx.sym.Group(sym)
      with SummaryWriter(logdir=logdir) as sw:
          sw.add_graph(sym)
      usage = "`tensorboard --logdir={} --host=127.0.0.1 --port=8888`".format(
          logdir
      )
      print("Log saved. Use: {} to visualize it".format(usage))
  
imports: import tempfile
  import mxnet
  from mxnet import gluon
label_desc: Use image node_id 2 for calling a global function with example usage: plot_mxboard(block, logdir) without return types