(function from pyomo.dae.misc)
pyomo.dae.misc
This method returns a function which applies a discretization scheme to an expression along a particular indexing set. This is admittedly a convoluted looking implementation. The idea is that we only apply a discretization scheme to one indexing set at a time but we also want the function to be expanded over any other indexing sets.