Any person who claims that a person purporting to be a member of the Parliament is disqualified or has been disqualified at any time since being returned may apply to the Court of Session for a declarator to that effect.
An application in respect of any person may be made whether the grounds on which it is made are alleged to have subsisted when the person was returned or to have arisen subsequently.
No declarator shall be made—
The person in respect of whom an application is made shall be the defender.
The applicant shall give such caution for the expenses of the proceedings as the Court of Session may direct; but any such caution shall not exceed £5,000 or such other sum as the Scottish Ministers may by order specify.
The decision of the court on an application under this section shall be final.
In this section "disqualified" means disqualified from being a member of the Parliament or from being a member for the constituency or region for which the person concerned purports to sit.