def _namespaceFromCallingContext():
        """
        Derive a namespace from the module containing the caller's caller.

        @return: the fully qualified python name of a module.
        @rtype: L{str} (native string)
        """
        try:
            return currentframe(2).f_globals["__name__"]
        except KeyError:
            return "<unknown>"

        Derive a namespace from the module containing the caller's caller.

        @return: the fully qualified python name of a module.
        @rtype: L{str} (native string)
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/_logger.py