code: def test_add_graph_gluon():
      net = nn.HybridSequential()
      with net.name_scope():
          net.add(nn.Dense(128, activation="relu"))
  
      net.hybridize()
      net.initialize()
      net.forward(
          mx.nd.ones(
              1,
          )
      )
      _, sym = net._cached_graph
      nodes = _get_nodes_from_symbol(sym)
      expected_nodes = [
          NodeDef(name="data", op="null"),
          NodeDef(
              name="hybridsequential0_dense0_fwd/hybridsequential0_dense0_weight",
              op="null",
              attr={
                  "param": AttrValue(
                      s="{ __dtype__ :  0 ,  __lr_mult__ :  1.0 ,  __shape__ :  "
                      "(128, 0) ,  __storage_type__ :  0 ,  __wd_mult__ :  1.0 }".encode(
                          encoding="utf-8"
                      )
                  )
              },
          ),
          NodeDef(
              name="hybridsequential0_dense0_fwd/hybridsequential0_dense0_bias",
              op="null",
              attr={
                  "param": AttrValue(
                      s="{ __dtype__ :  0 ,  __init__ :  zeros ,  __lr_mult__ :  1.0 ,  __shape__ :  "
                      "(128,) ,  __storage_type__ :  0 ,  __wd_mult__ :  1.0 }".encode(
                          encoding="utf-8"
                      )
                  )
              },
          ),
          NodeDef(
              name="hybridsequential0_dense0_fwd/hybridsequential0_dense0_fwd",
              op="FullyConnected",
              input=[
                  "data",
                  "hybridsequential0_dense0_fwd/hybridsequential0_dense0_weight",
                  "hybridsequential0_dense0_fwd/hybridsequential0_dense0_bias",
              ],
              attr={
                  "param": AttrValue(
                      s="{ flatten :  True ,  no_bias :  False ,  "
                      "num_hidden :  128 }".encode(encoding="utf-8")
                  )
              },
          ),
          NodeDef(
              name="hybridsequential0_dense0_relu_fwd/hybridsequential0_dense0_relu_fwd",
              op="Activation",
              input=[
                  "hybridsequential0_dense0_fwd/hybridsequential0_dense0_fwd"
              ],
              attr={
                  "param": AttrValue(
                      s="{ act_type :  relu }".encode(encoding="utf-8")
                  )
              },
          ),
      ]
      # check _get_nodes_from_symbol
      for expected_node, node in zip(expected_nodes, nodes):
          assert expected_node == node
  
      # check _sym2pb
      expected_graph = GraphDef(
          node=expected_nodes, versions=VersionDef(producer=100)
      )
      graph = _net2pb(net)
      assert expected_graph == graph
  
      # check add_graph
      with SummaryWriter(logdir=_LOGDIR) as sw:
          sw.add_graph(net)
      check_event_file_and_remove_logdir()
  
imports: import shutil
  from mxboard import SummaryWriter
  from mxboard.utils import _make_metadata_tsv, make_image_grid, _make_sprite_image
  from mxboard.utils import _add_embedding_config, _save_embedding_tsv, _get_embedding_dir
  from mxboard.summary import _get_nodes_from_symbol, _net2pb
  from mxboard.proto.node_def_pb2 import NodeDef
  from mxboard.proto.attr_value_pb2 import AttrValue
  from mxboard.proto.graph_pb2 import GraphDef
  from mxboard.proto.versions_pb2 import VersionDef
  from mxnet.test_utils import *
  from mxnet.gluon import nn
  import mxnet
  from common import with_seed, setup_module
  from nose.tools import make_decorator
label_desc: Use image node_id 30 for calling a global function with example usage: test_add_graph_gluon() without return types