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: from __future__ import absolute_import, print_function, division
  from copy import copy, deepcopy
  from functools import wraps
  import logging
  import sys
  import unittest
  from parameterized import parameterized
  from nose.tools import assert_raises
  from six import integer_types
  from six.moves import StringIO
  import numpy
  import theano
  import theano.tensor
  from theano import config
label_desc: Use image node_id 5 for calling the TestOptimizationMixin obj's underlying member method code with example usage: obj.assertFunctionContainsClass(f, op, min, max) without return types