code: def test_mlp(self, mode):
      m = models.Mlp()
      f = function(m.inputs, m.outputs, mode=mode)
      pdf = PyDotFormatter()
      graph = pdf(f)
      if mode == "FAST_RUN":
          expected = 13
      elif mode == "FAST_COMPILE":
          expected = 14
      assert len(graph.get_nodes()) == expected
      nc = self.node_counts(graph)
  
      if mode == "FAST_RUN":
          assert nc["apply"] == 7
      elif mode == "FAST_COMPILE":
          assert nc["apply"] == 8
      assert nc["output"] == 1
  
file_path: pytensor/tests/d3viz/test_formatting.py
imports: import numpy
  import pytest
  from pytensor import config, function
  from pytensor.d3viz.formatting import PyDotFormatter
  from pytensor.printing import pydot_imported, pydot_imported_msg
  from tests.d3viz import models
label_desc: Use image node_id 3 for calling the TestPyDotFormatter obj's underlying member method code with example usage: obj.test_mlp(mode) without return types