def METHOD_NAME(
    self, info: Info, input: SendGrantReplyInput
) -> SendGrantReplyResult:
    request = info.context.request
    grant = GrantModel.objects.get(id=input.instance)
    if not grant.can_edit(request.user):
        return SendGrantReplyError(message="You cannot reply to this grant")
    # Can't modify the status if the grant is still pending or was already rejected
    if grant.status in (GrantModel.Status.pending, GrantModel.Status.rejected):
        return SendGrantReplyError(message="You cannot reply to this grant")
    # do not update to need_info, otherwise we will lose the orignal status:
    # Approved, WaitingList
    if input.status != StatusOption.need_info:
        grant.status = input.status.to_grant_status()
    grant.applicant_message = input.message
    grant.save()
    notify_new_grant_reply(grant, request)
    if grant.applicant_message:
        send_message_to_plain(grant, input.message)
    return Grant.from_model(grant)