code: def test_ofg(self):
      m = models.Ofg()
      f = function(m.inputs, m.outputs)
      pdf = PyDotFormatter()
      graph = pdf(f)
      assert len(graph.get_nodes()) == 10
      sub_graphs = graph.get_subgraph_list()
      assert len(sub_graphs) == 2
      ofg1, ofg2 = sub_graphs
      if config.mode == "FAST_COMPILE":
          assert len(ofg1.get_nodes()) == 8
      else:
          assert len(ofg1.get_nodes()) == 5
      assert len(ofg1.get_nodes()) == len(ofg2.get_nodes())
  
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 4 for calling the TestPyDotFormatter obj's underlying member method code with example usage: obj.test_ofg() without return types