def _wrappedLogPrefix(wrapper, wrapped):
    """
    Compute a log prefix for a wrapper and the object it wraps.

    @rtype: C{str}
    """
    if ILoggingContext.providedBy(wrapped):
        logPrefix = wrapped.logPrefix()
    else:
        logPrefix = wrapped.__class__.__name__
    return "%s (%s)" % (logPrefix, wrapper.__class__.__name__)

    Compute a log prefix for a wrapper and the object it wraps.

    @rtype: C{str}
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/policies.py