code: def assertFunctionContainsClass(self, f, op, min=1, max=sys.maxsize):
      toposort = f.maker.fgraph.toposort()
      matches = [node for node in toposort if isinstance(node.op, op)]
      assert min <= len(matches) <= max, (
          toposort,
          matches,
          str(op),
          len(matches),
          min,
          max,
      )
  
imports: import logging
  import sys
  from copy import copy, deepcopy
  from functools import wraps
  import numpy
  import pytest
  import pytensor
  from pytensor.compile.debugmode import str_diagnostic
  from pytensor.configdefaults import config
  from pytensor.gradient import verify_grad
  from pytensor.tensor.basic import as_tensor_variable
  from pytensor.tensor.math import _allclose
  from pytensor.tensor.math import add
label_desc: Use image node_id 5 for calling the OptimizationTestMixin obj's underlying member method code with example usage: obj.assertFunctionContainsClass(f, op, min, max) without return types