code: def _test_graph(self, model, dummy_input, expected_file):
      actual_proto, _ = build_graph(model, dummy_input)
  
      assert os.path.exists(expected_file), expected_file
      with open(expected_file, "r") as f:
          expected_str = f.read()
  
      expected_proto = GraphDef()
      text_format.Parse(expected_str, expected_proto)
  
      self.assertEqual(len(expected_proto.node), len(actual_proto.node))
      for i in range(len(expected_proto.node)):
          expected_node = expected_proto.node[i]
          actual_node = actual_proto.node[i]
          self.assertEqual(expected_node.name, actual_node.name)
          self.assertEqual(expected_node.op, actual_node.op)
          self.assertEqual(expected_node.input, actual_node.input)
          self.assertEqual(expected_node.device, actual_node.device)
          self.assertEqual(
              sorted(expected_node.attr.keys()),
              sorted(actual_node.attr.keys()),
          )
  
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 2 for calling the GraphUtilsTestCase obj's underlying member method code with example usage: obj._test_graph(model, dummy_input, expected_file) without return types