YESTERDAY, I participated in a webinar to mark the publication of a book called The Parliamentary Battle Over Brexit And The Constitution. The book charts the fierce arguments that took place over the role of the UK’s political institutions and asks whether what happened demonstrated fundamental flaws in the UK constitution and whether there were ways that things could have been handled better.

It also ponders whether lasting political damage has been caused by the tensions that occurred.

If you watched Boris Johnson squirming and squealing over his partygate lies in front of the privileges committee on Wednesday afternoon, I suspect you will agree with me that the answer to that last question is obvious.

The book contains a lot of detail about key political moments including the Brexit referendum campaign itself: Gina Miller’s first court case establishing that parliament must give the go-ahead for the triggering of Article 50; the problem posed by the Irish border (which Brexiteer insouciance had not foreseen); Theresa May’s disastrous decision to go for a snap General Election in 2017; parliament wresting control of parliamentary business from the Government; the election of Johnson and the rise of populism typified by media headlines about judges being “enemies of the people”; the claims by both May and Johnson to be on the side of the public against a recalcitrant parliament; and, of course, the unlawful prorogation of parliament.

READ MORE: Text break-up? Why Sturgeon won't meet King to formally quit as FM

The book explodes the myth that a “Remainer” parliament stopped May from delivering Brexit and illustrates that what really stymied the process were the arguments within the Conservative Party – and that it was Johnson and other Eurosceptics who really blocked May’s path.

However, as I read the book in preparation for the webinar what struck me most was how largely absent Scotland and the SNP were from the account of events. This could be put down to metropolitan bias, but I know one of the authors well, and both she and the Constitution Unit at University College London where she works take a real interest in the Scottish dimension of current British politics.

Indeed, the book acknowledges that devolution should have challenged the sovereignty of the Westminster parliament. There is also some discussion of the tensions between Westminster and the devolved institutions during the Brexit process.

The truth is that while some Scottish politicians made significant interventions in the Brexit process, neither the SNP nor the Scottish Government got any concessions out of the whole damn mess despite the SNP being the third party in a hung parliament.

Apart from pushing the solutions canvassed in the excellent paper Scotland’s Place In Europe, the SNP’s parliamentary strategy seemed largely to exist of standing up and declaiming that Scotland would not be taken out of Europe against its will without engaging in any meaningful activity to ensure that would not happen.

The National:

The result was that Scotland was taken out of the EU against our will and we ended up with nothing to show for two and a half years of parliamentary wrangling when you might have thought that a block of 35 SNP votes in a hung parliament could have put us in a powerful bargaining position.

In the spirit of self-examination occasioned by the recent events surrounding Nicola Sturgeon’s resignation and the SNP leadership election, I think we need to look at what went wrong and take some learnings from it. Particularly as another hung parliament is a distinct possibility following next year’s General Election.

Many of the significant parliamentary initiatives emanated from a cross-party group of backbenchers from the two big parties and others from the smaller parties (except the DUP) of which I and Philippa Whitford were part.

In what was often a fast-moving situation we met daily and engaged in detailed discussions of tactics and strategy. So far as I am aware, the SNP group did not have anything like this strategic engine room. In the 2015-2017 parliament, Alex Salmond established an SNP Brexit strategy group which met regularly.

In the 2017-2019 parliament, no such group existed or if it did, neither I nor Philippa were invited to take part and I am not aware of any initiatives which emanated from the SNP.

The initiatives in which I participated were devised with the assistance of politicians from other parties like Andy Wightman and outside advisors like the barrister Jolyon Maugham. Andy’s court case – in which I was a co-litigant – established at the EU Court of Justice that Article 50 could be unilaterally revoked thereby opening up an important way out of the mess the Tories had got us into.

READ MORE: Don't scrap marine conservation plans, say environmental organisations

However, when I first mooted supporting the case a senior Scottish Government Cabinet Secretary tried to talk me out of it.

It was just as well I ignored him as the inclusion of at least one MP among the petitioners proved vital and the case could not have gone forward without a Westminster MP.

MPs needed to know what the options were when the meaningful vote on the Brexit deal was finally taken, and the case made it clear that the UK could revoke Article 50 and remain in the EU rather than crashing out without a deal as it looked like Boris Johnson was prepared to do.

Likewise, when I decided to lead the case challenging the unlawful prorogation in the Scottish courts, the SNP leadership at Westminster and at Holyrood were not terribly interested until it became clear we were going to win.

Yet, the existence of the Scottish case proved pivotal when, after Gina Miller’s case failed in the English High Court, the Inner House of the Court of Session breathed new life into the legal challenge with their unanimous finding that the prorogation was unlawful, which paved the way for victory in the Supreme Court. The Scottish courts played a pivotal role both in the Article 50 case and in the case against prorogation.

In my opinion, Scottish politicians could have had a pivotal role if the SNP had had a strategy for exploiting the potential power we had after the 2017 election. Yes, we too had lost seats and gone from 56 to 35 MPs, but we were the third party in a hung parliament where the PM was facing frequent rebellions.

There are well-founded rumours that May’s civil servants advised her to be prepared to make serious concessions to the Scottish Government in return for some cooperation from SNP MPs in getting her softer version of Brexit through parliament.

What these were and whether they might have been attractive in the sense of protecting our country from the worst excesses of Brexit or indeed furthering the goal of independence, we shall never know as it is said the confrontational attitude adopted at early meetings led to the decision that cooperation would not be forthcoming.

Certainly, when May held cross-party talks in January 2019, I am not aware of the SNP having got anything out of it, despite her desperation at that stage to find a way forward.

Should the SNP ever find itself with such potential influence in a hung parliament again, we need to find a way to prosecute our advantage. All the leadership candidates now seem to accept that the party needs a bigger tent approach which harnesses all the talents in the party. We also need a better approach to statecraft.

Sometimes you need to tough it out and not be bowed by outside influences. Sometimes you need to be prepared to work with your political opponents to get what you want. This was done very successfully by the SNP during the years of our first minority government from 2007-2011.

It was my biggest learning from the Brexit process and it’s a lesson the new SNP leader would do well to take on board.