and Conservative parties generally observed a practice of not running a candidate against another party's new leader in the by-election, the New Democratic Party and smaller political parties typically do not follow the same practice. However, if the governing party selects a new leader shortly before an election is due, and that new leader is not a member of the legislature, they will normally await the upcoming election before running for a seat in Parliament. Term of office The prime minister serves at Majesty's pleasure, meaning the post does not have a fixed term, and once appointed and sworn in by the governor general, the prime minister remains in office until they resign, are dismissed, or die. While the lifespan of a parliament is constitutionally limited to five years, a 2007 amendment to the Canada Elections Act, Section 56.1(2) limited the term of a majority government to four years, with election day being set as the third Monday in October of the fourth calendar year after the previous polling date. The governor general may still, on the advice of the prime minister, dissolve parliament and issue the writs of election prior to the date mandated by the constitution or Canada Elections Act; the King–Byng Affair was the only time since Confederation that the governor general refused the prime minister's request for a general vote. Following parliamentary dissolution, the prime minister must run in the resulting general election to maintain a seat in the House of Commons. Should the prime minister's party subsequently win a majority of seats in the House of Commons, it is unnecessary to re-appoint the prime minister or for the prime minister to retake the oath of office. If, however, an opposition party wins a majority of seats, the prime minister may resign or be dismissed by the governor general. Should the prime minister's party achieve a minority while an opposition party wins a plurality (i.e., more seats than any other party but less than a majority), the prime minister can attempt to maintain the confidence of the House by forming a coalition with other minority parties, which was last entertained in 1925 or by entering into a confidence-and-supply agreement. Role and authority Because the prime minister is in practice the most politically powerful member of the Canadian government, they are sometimes erroneously referred to as Canada's head of state, when, in fact, that role belongs to