def __call__(self, fqdn, package, parent, stackdepth=_def_stackdepth):
def wrapper(*argl, **argd):<EOL><INDENT>global streamlining, _cstack_call<EOL>origstream = None<EOL>if not (decorating or streamlining):<EOL><INDENT>entry, bound, ekey = pre(fqdn, parent, stackdepth, *argl,**argd)<EOL>if fqdn in _streamlines and _streamlines[fqdn]:<EOL><INDENT>msg.std("<STR_LIT>".format(fqdn), <NUM_LIT:2>)<EOL>origstream = streamlining<EOL>streamlining = True<EOL><DEDENT><DEDENT>try:<EOL><INDENT>result = self.func(*argl, **argd)<EOL><DEDENT>except:<EOL><INDENT>if len(_cstack_call) > <NUM_LIT:0>:<EOL><INDENT>_cstack_call.pop()<EOL><DEDENT>if not testmode and not(decorating or streamlining):<EOL><INDENT>import sys<EOL>xt, xm = sys.exc_info()[<NUM_LIT:0>:<NUM_LIT:2>]<EOL>if not hasattr(xm, "<STR_LIT>"):<EOL><INDENT>xm = [xm]<EOL><DEDENT>error = "<STR_LIT>".format(xt.__name__, '<STR_LIT:U+002CU+0020>'.join(xm))<EOL>if entry is not None:<EOL><INDENT>entry["<STR_LIT:!>"] = error<EOL><DEDENT><DEDENT>raise    <EOL><DEDENT>if not decorating:<EOL><INDENT>if fqdn in _callwraps:<EOL><INDENT>result = _callwraps[fqdn](result)<EOL><DEDENT><DEDENT>if origstream is not None:<EOL><INDENT>streamlining = origstream<EOL><DEDENT>if not (decorating or streamlining):<EOL><INDENT>post(fqdn, package, result, entry, bound, ekey, *argl, **argd)<EOL><DEDENT>return result<EOL><DEDENT>_safe_setattr(wrapper, "<STR_LIT>", self.func)<EOL>setattr(wrapper, "<STR_LIT>", _safe_getattr(wrapper))<EOL>return wrapper<EOL>
Constructs a calling wrapper for the specified reference to
        :attr:`func`.

        Args:
            fqdn (str): fully qualified name of the method being decorated.
            package (str): name of the package the `func` belongs to.
            parent: class to which `func` belongs if it exists.
            stackdepth (int): if the calling stack is less than this depth, than
              include the entry in the log; otherwise ignore it.

        Returns:
            function: the wrapper that logs before and after the function call
              based on package settings.