(function from pyomo.core.plugins.transform.util)
pyomo.core.plugins.transform.util
copy.deepcopy balks at copying anonymous functions. This overrides the default behavior of functools.partial to make deepcopy return the function itself, rather than attempting to copy it.