code: def test_module_reuse(self):
      class MyModule(nn.Module):
          def __init__(self):
              super().__init__()
              self.liner1 = nn.Linear(10, 10)
              self.relu = nn.ReLU(inplace=True)
              self.liner2 = nn.Linear(10, 20)
              self.liner3 = nn.Linear(20, 10)
  
          def forward(self, x):
              x = self.liner1(x)
              x = self.relu(x)
              x = self.liner2(x)
              x = self.relu(x)
              x = self.liner3(x)
              x = self.relu(x)
              return x
  
      data = torch.rand(10, 10)
      net = MyModule()
      traced = torch.jit.trace(net, data)
      modulegraph = TorchModuleGraph(traced_model=traced)
      # Traverse the TorchModuleGraph, due the resue of the relu module,
      # there will be three cpp_nodes corrspoding to the same module.
      # During traversing the graph, there should be only one
      # successor of each cpp-node (including the cpp_nodes that corresponds
      # to the same relu module).
      for name, nodeio in modulegraph.nodes_py.nodes_io.items():
          if nodeio.input_or_output == "input":
              # Find the first node of the whole graph
              start_nodes = modulegraph.input_to_node[name]
              # We have only one single path top-down
              assert len(start_nodes) == 1
              node = start_nodes[0].unique_name
              while modulegraph.find_successors(node):
                  nodes = modulegraph.find_successors(node)
                  assert len(nodes) == 1
                  node = nodes[0]
  
imports: import sys
  import os
  import math
  import uuid
  import shutil
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from tensorboard.compat.proto.graph_pb2 import GraphDef
  from google.protobuf import text_format
  import unittest
  from unittest import TestCase, main
  from nni.common.graph_utils import build_module_graph, build_graph, TorchModuleGraph, TUPLE_UNPACK_KIND
label_desc: Use image node_id 6 for calling the GraphUtilsTestCase obj's underlying member method code with example usage: obj.test_module_reuse() and returns: x