def METHOD_NAME(
    staff_api_client,
    product_with_variant_with_file_attribute,
    file_attribute,
    permission_manage_product_types_and_attributes,
):
    query = PRODUCT_TYPE_DELETE_MUTATION
    product_type = product_with_variant_with_file_attribute.product_type
    product_type.product_attributes.add(file_attribute)
    associate_attribute_values_to_instance(
        product_with_variant_with_file_attribute,
        file_attribute,
        file_attribute.values.last(),
    )
    values = list(file_attribute.values.all())
    variables = {"id": graphene.Node.to_global_id("ProductType", product_type.id)}
    response = staff_api_client.post_graphql(
        query, variables, permissions=[permission_manage_product_types_and_attributes]
    )
    content = get_graphql_content(response)
    data = content["data"]["productTypeDelete"]
    assert data["productType"]["name"] == product_type.name
    with pytest.raises(product_type._meta.model.DoesNotExist):
        product_type.refresh_from_db()
    for value in values:
        with pytest.raises(value._meta.model.DoesNotExist):
            value.refresh_from_db()
    with pytest.raises(
        product_with_variant_with_file_attribute._meta.model.DoesNotExist
    ):
        product_with_variant_with_file_attribute.refresh_from_db()