<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bind_all(morc, builtin_only=False, stoplist=None, verbose=None):
 """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. :param morc: module or class to transform. :param bool builtin_only: only transform builtin objects. :param list stoplist: attribute names to not transform. :param function verbose: logger function which takes in parameter a message """


    if stoplist is None:
        stoplist = []

    def _bind_all(morc, builtin_only=False, stoplist=None, verbose=False):
        """Internal bind all decorator function.
        """
        if stoplist is None:
            stoplist = []

        if isinstance(morc, (ModuleType, type)):
            for k, val in list(vars(morc).items()):
                if isinstance(val, FunctionType):
                    newv = _make_constants(
                        val, builtin_only, stoplist, verbose
                    )
                    setattr(morc, k, newv)
                elif isinstance(val, type):
                    _bind_all(val, builtin_only, stoplist, verbose)

    if isinstance(morc, dict):  # allow: bind_all(globals())
        for k, val in list(morc.items()):
            if isinstance(val, FunctionType):
                newv = _make_constants(val, builtin_only, stoplist, verbose)
                morc[k] = newv
            elif isinstance(val, type):
                _bind_all(val, builtin_only, stoplist, verbose)
    else:
        _bind_all(morc, builtin_only, stoplist, verbose)