code: def test_ofg_nested(self):
      m = models.OfgNested()
      f = 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: 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 5 for calling the TestPyDotFormatter obj's underlying member method code with example usage: obj.test_ofg_nested() without return types