def METHOD_NAME(self, request) -> Optional[Assignment]:
    """
    Get or create an assignment for the current launch.
    The returned assignment will have the relevant configuration for this
    launch.
    :returns: An assignment or None if one cannot be found or created.
    """
    lti_params = request.lti_params
    tool_consumer_instance_guid = lti_params["tool_consumer_instance_guid"]
    resource_link_id = lti_params.get("resource_link_id")
    # Get the potentially relevant assignments from the DB
    assignment = self.get_assignment(tool_consumer_instance_guid, resource_link_id)
    historical_assignment = None
    if not assignment:
        historical_assignment = self._get_copied_from_assignment(lti_params)
    # Get the configuration for the assignment
    # it might be based on the assignments we just queried or the request
    document_url = self._misc_plugin.get_document_url(
        request, assignment, historical_assignment
    )
    group_set_id = self._grouping_plugin.get_group_set_id(
        request, assignment, historical_assignment
    )
    if not document_url:
        # We can't find a document_url, we shouldn't try to create an
        # assignment yet.
        return None
    if not assignment:
        # We don't have an assignment in the DB, but we know which document
        # url it should point to. This might happen for example on:
        #
        #  * The first launch of a deep linked assignment
        #  * The first launch copied assignment
        assignment = self.create_assignment(
            tool_consumer_instance_guid, resource_link_id
        )
        # While creating a new assignment we found the assignment we
        # copied this one from. Reference this in the DB.
        assignment.copied_from = historical_assignment
    # Always update the assignment configuration
    # It often will be the same one while launching the assignment again but
    # it might for example be an updated deep linked URL or similar.
    return self.update_assignment(request, assignment, document_url, group_set_id)