def _setup(self):
        """Wire this tool into ``cherrypy.request``.

        The standard CherryPy request object will automatically call
        this method when the tool is "turned on" in config.
        """
        conf = self._merged_args()
        p = conf.pop('priority', None)
        if p is None:
            p = getattr(self.callable, 'priority', self._priority)
        cherrypy.serving.request.hooks.attach(
            self._point,
            self._wrapper,
            priority=p,
            **conf,
        )
Wire this tool into ``cherrypy.request``.

        The standard CherryPy request object will automatically call
        this method when the tool is "turned on" in config.
        
cherrypy/_cptools.py