def METHOD_NAME(
    product_type_page_reference_attribute,
    staff_api_client,
    page,
    variant,
    permission_manage_pages,
):
    query = PAGE_DELETE_MUTATION
    product_type = variant.product.product_type
    product_type.variant_attributes.set([product_type_page_reference_attribute])
    attr_value = AttributeValue.objects.create(
        attribute=product_type_page_reference_attribute,
        name=page.title,
        slug=f"{variant.pk}_{page.pk}",
        reference_page=page,
    )
    associate_attribute_values_to_instance(
        variant, product_type_page_reference_attribute, attr_value
    )
    reference_id = graphene.Node.to_global_id("Page", page.pk)
    variables = {"id": reference_id}
    response = staff_api_client.post_graphql(
        query, variables, permissions=[permission_manage_pages]
    )
    content = get_graphql_content(response)
    data = content["data"]["pageDelete"]
    with pytest.raises(attr_value._meta.model.DoesNotExist):
        attr_value.refresh_from_db()
    with pytest.raises(page._meta.model.DoesNotExist):
        page.refresh_from_db()
    assert not data["errors"]