code: def test_build_module_graph(self):
      big_model = BigModel()
      g = build_module_graph(big_model, torch.randn(2, 1, 28, 28))
      print(g.name_to_node.keys())
      leaf_modules = set(
          [
              "backbone1.conv1",
              "backbone2.bn1",
              "backbone2.bn2",
              "backbone2.conv1",
              "backbone2.conv2",
              "backbone2.fc1",
              "backbone2.fc2",
              "fc3",
          ]
      )
  
      assert set(g.leaf_modules) == leaf_modules
      assert not leaf_modules - set(g.name_to_node.keys())
      assert g.find_successors("backbone2.conv1") == ["backbone2.bn1"]
      assert g.find_successors("backbone2.conv2") == ["backbone2.bn2"]
      assert g.find_predecessors("backbone2.bn1") == ["backbone2.conv1"]
      assert g.find_predecessors("backbone2.bn2") == ["backbone2.conv2"]
  
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 1 for calling the GraphUtilsTestCase obj's underlying member method code with example usage: obj.test_build_module_graph() without return types