code: def test_mlp(self):
      m = models.Mlp()
      f = th.function(m.inputs, m.outputs)
      pdf = PyDotFormatter()
      graph = pdf(f)
      expected = 11
      if th.config.mode == "FAST_COMPILE":
          expected = 12
      self.assertEqual(len(graph.get_nodes()), expected)
      nc = self.node_counts(graph)
  
      if th.config.mode == "FAST_COMPILE":
          assert nc["apply"] == 6
      else:
          assert nc["apply"] == 5
      assert nc["output"] == 1
  
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 3 for calling the TestPyDotFormatter obj's underlying member method code with example usage: obj.test_mlp() without return types