def METHOD_NAME(self):
    parsed_params = self.request.parsed_params
    params = {
        "focused_user": parsed_params["h_username"],
        "learner_canvas_user_id": parsed_params["learner_canvas_user_id"],
        "group_set": parsed_params.get("group_set"),
        "resource_link_id": parsed_params.get("resource_link_id"),
    }
    if parsed_params.get("document_url"):
        params["url"] = parsed_params.get("document_url")
    elif book_id := parsed_params.get("vitalsource_book_id"):
        params["vitalsource_book"] = "true"
        params["book_id"] = book_id
        params["cfi"] = parsed_params["vitalsource_cfi"]
    else:
        assert parsed_params.get("canvas_file_id"), (
            "All Canvas launches should have either a 'document_url' a 'vitalsource_book_id' or "
            "a 'canvas_file_id' parameter."
        )
        params["canvas_file"] = "true"
        params["file_id"] = parsed_params["canvas_file_id"]
    # **WARNING**
    #
    # Canvas has a bug with handling of percent-encoded characters in the
    # the SpeedGrader launch URL. Code that responds to the launch will
    # need to handle this for fields that may contain such chars (eg.
    # the "url" field).
    #
    # See https://github.com/instructure/canvas-lms/issues/1486
    return self.request.route_url("lti_launches", _query=params)