def METHOD_NAME(
    mocked_refund,
    staff_api_client,
    permission_group_manage_orders,
    order_with_lines,
    payment_dummy,
    count_queries,
):
    query = """
        mutation OrderFulfillmentRefundProducts(
            $order: ID!, $input: OrderRefundProductsInput!
        ) {
            orderFulfillmentRefundProducts(
                order: $order,
                input: $input
            ) {
                fulfillment{
                    id
                    status
                    lines{
                        id
                        quantity
                        orderLine{
                            id
                        }
                    }
                }
                errors {
                    field
                    code
                    message
                    warehouse
                    orderLines
                }
            }
        }
    """
    permission_group_manage_orders.user_set.add(staff_api_client.user)
    payment_dummy.total = order_with_lines.total_gross_amount
    payment_dummy.captured_amount = payment_dummy.total
    payment_dummy.charge_status = ChargeStatus.FULLY_CHARGED
    payment_dummy.save()
    order_with_lines.payments.add(payment_dummy)
    line_to_refund = order_with_lines.lines.first()
    order_id = graphene.Node.to_global_id("Order", order_with_lines.pk)
    line_id = graphene.Node.to_global_id("OrderLine", line_to_refund.pk)
    variables = {
        "order": order_id,
        "input": {"orderLines": [{"orderLineId": line_id, "quantity": 2}]},
    }
    response = staff_api_client.post_graphql(query, variables)
    content = get_graphql_content(response)
    assert content["data"]["orderFulfillmentRefundProducts"]["fulfillment"]