def _getNameResolverAndMaybeWarn(self, reactor):
        """
        Retrieve a C{nameResolver} callable and warn the caller's
        caller that using a reactor which doesn't provide
        L{IReactorPluggableNameResolver} is deprecated.

        @param reactor: The reactor to check.

        @return: A L{IHostnameResolver} provider.
        """
        if not IReactorPluggableNameResolver.providedBy(reactor):
            warningString = deprecate.getDeprecationWarningString(
                reactor.__class__,
                Version('Twisted', 17, 5, 0),
                format=("Passing HostnameEndpoint a reactor that does not"
                        " provide IReactorPluggableNameResolver (%(fqpn)s)"
                        " was deprecated in %(version)s"),
                replacement=("a reactor that provides"
                             " IReactorPluggableNameResolver"),
            )
            warnings.warn(warningString, DeprecationWarning, stacklevel=3)
            return _SimpleHostnameResolver(self._fallbackNameResolution)
        return reactor.nameResolver

        Retrieve a C{nameResolver} callable and warn the caller's
        caller that using a reactor which doesn't provide
        L{IReactorPluggableNameResolver} is deprecated.

        @param reactor: The reactor to check.

        @return: A L{IHostnameResolver} provider.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/endpoints.py