def bind_all(mc, builtin_only=False, stoplist=[],  verbose=False):
import types<EOL>try:<EOL><INDENT>d = vars(mc)<EOL><DEDENT>except TypeError:<EOL><INDENT>return<EOL><DEDENT>for k, v in d.items():<EOL><INDENT>if isinstance( v, types.FunctionType ) :<EOL><INDENT>if verbose :<EOL><INDENT>print( '<STR_LIT>', v.__name__, '<STR_LIT:)>' )<EOL><DEDENT>newv = _make_constants(v, builtin_only, stoplist,  verbose)<EOL>setattr(mc, k, newv)<EOL><DEDENT>elif type(v) in ( type, types.ModuleType ):<EOL><INDENT>bind_all(v, builtin_only, stoplist, verbose)<EOL><DEDENT><DEDENT>
Recursively apply constant binding to functions in a module or class.

    Use as the last line of the module (after everything is defined, but
    before test code).  In modules that need modifiable globals, set
    builtin_only to True.