docs: def generate_prepared_request(method, url, headers, data, params, handlers):
      """Add handlers and prepare a Request.
  
      Parameters
          method (str)
              HTTP Method. (e.g. 'POST')
          headers (dict)
              Headers to send.
          data (JSON-formatted str)
              Body to attach to the request.
          params (dict)
              Dictionary of URL parameters to append to the URL.
          handlers (list)
              List of callback hooks, for error handling.
  
      Returns
          (requests.PreparedRequest)
              The fully mutable PreparedRequest object,
              containing the exact bytes to send to the server.
      """
      request = Request(
          method=method,
          url=url,
          headers=headers,
          data=data,
          params=params,
      )
  
      handlers.append(error_handler)
  
      for handler in handlers:
          request.register_hook('response', handler)
  
      return request.prepare()