code: def extractgraph(self, dummy_input):
      with self.set_training(self.model, False):
          import torch.jit
  
          trace, output = torch.jit.get_trace_graph(
              self.model, (dummy_input,)
          )
  
      trace.set_graph(
          PytorchGraph._optimize_graph(trace.graph(), False)
      )
      # nodes
      nodes = list(trace.graph().nodes())
      graph = trace.graph()
      return graph, nodes
  
imports: from mmdnn.conversion.common.DataStructure.graph import GraphNode, Graph
  import torch
  import torch.autograd
  import torch.serialization
  import contextlib
  from torch.jit import _unique_state_dict
label_desc: Use image node_id 2 for calling the PytorchGraph040 obj's underlying member method code with example usage: obj.extractgraph(dummy_input) and returns: graph,  nodes