def METHOD_NAME(self):
    try:
        return self.get_object()
    except Http404:
        if self.request.method == "PUT":
            # For PUT-as-create operation, we need to ensure that we have
            # relevant permissions, as if this was a POST request.  This
            # will either raise a PermissionDenied exception, or simply
            # return None.
            # xi: checks permission on wrong path
            self.check_permissions(clone_request(self.request, "POST"))
        else:
            # PATCH requests where the object does not exist should still
            # return a 404 response.
            raise