code: def test_ofg_nested(self):
      m = models.OfgNested()
      f = th.function(m.inputs, m.outputs)
      pdf = PyDotFormatter()
      graph = pdf(f)
      assert len(graph.get_nodes()) == 7
      assert len(graph.get_subgraph_list()) == 1
      ofg1 = graph.get_subgraph_list()[0]
      assert len(ofg1.get_nodes()) == 6
      assert len(ofg1.get_subgraph_list()) == 1
      ofg2 = ofg1.get_subgraph_list()[0]
      assert len(ofg2.get_nodes()) == 4
  
file_path: Theano/theano/d3viz/tests/test_formatting.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import unittest
  import theano
  from theano.d3viz.formatting import PyDotFormatter
  from theano.d3viz.tests import models
  from nose.plugins.skip import SkipTest
  from theano.d3viz.formatting import pydot_imported, pydot_imported_msg
label_desc: Use image node_id 5 for calling the TestPyDotFormatter obj's underlying member method code with example usage: obj.test_ofg_nested() without return types