code: def check(self, f, reference=None, verbose=False):
      tmp_dir = tempfile.mkdtemp()
      html_file = pt.join(tmp_dir, "index.html")
      if verbose:
          print(html_file)
      d3v.d3viz(f, html_file)
      assert pt.getsize(html_file) > 0
      if reference:
          assert filecmp.cmp(html_file, reference)
  
file_path: pytensor/tests/d3viz/test_d3viz.py
imports: import filecmp
  import os.path
  import tempfile
  import numpy
  import pytest
  import pytensor.d3viz
  from pytensor import compile
  from pytensor.compile.function import function
  from pytensor.configdefaults import config
  from pytensor.printing import pydot_imported, pydot_imported_msg
  from tests.d3viz import models
label_desc: Use image node_id 2 for calling the TestD3Viz obj's underlying member method code with example usage: obj.check(f, reference, verbose) without return types