code: def add_request_init_listener(self, fn, *args, **kwargs):
          
          self._request_init_callbacks.append((fn, args, kwargs))
docs: Adds a callback with arguments to be called when any request is created.
  
          It will be invoked as `fn(response_future, *args, **kwargs)` after each client request is created,
          and before the request is sent\*. This can be used to create extensions by adding result callbacks to the
          response future.
  
          \* where `response_future` is the :class:`.ResponseFuture` for the request.
  
          Note that the init callback is done on the client thread creating the request, so you may need to consider
          synchronization if you have multiple threads. Any callbacks added to the response future will be executed
          on the event loop thread, so the normal advice about minimizing cycles and avoiding blocking apply (see Note in
          :meth:`.ResponseFuture.add_callbacks`.
  
          See `this example <https://github.com/datastax/python-driver/blob/master/examples/request_init_listener.py>`_ in the
          source tree for an example.