MSPs are to be shown a cartoon featuring stick figures hugging, leering and vomiting in a toilet as part of a £50,000 programme to teach them about sexual harassment.

The animated film is part of a new “culture of respect” initiative being run at the Scottish Parliament in the wake of a series of misconduct scandals in public life.

Around eight workshops have been completed so far, with around 100 more due by January, taking in all 129 MSPs, and 1000 other staff and contractors at the parliament.

The cartoon has been borrowed from America where it was created as a "public service announcement" for the Time's Up movement, and is voiced by actors Rashida Jones, of Park and Recreation, and Donald Glover, who is in the new Star Wars spin-off Solo.

The Holyrood programme was set up after former SNP childcare minister Mark McDonald was banned for a month after sending a sleazy message to another MSP’s member of staff.

A fifth of Holyrood staff have experienced sexual harassment or sexist behaviour.

One of the scenarios discussed in the workshops has strong echoes of Mr McDonald’s case.

It says: “A colleague in another office has asked you out twice and both times you have politely said no. They have now started messaging you via social media and you don’t want to be rude by ignoring them as you working in the same building.”

MSPs will also be asked how they would react to sexist ‘banter’, the word "gay"

used as a pejorative term, lascivious looks, unwanted sexual attention on a night out, and being asked to adjust someone’s tie.

Although completed worksheets are supposed to be destroyed, some issued to the media at their training session yesterday contained personal information supplied by other workers.

The respect sessions are being provided by Hertfordshire based CMP Solutions.

Asked about the scenario similar to Mr McDonald’s case, a parliament spokesman said: “Scenarios were created to be plausible, but are not based on real cases we know of.”

Mr McDonald currently sits as the Independent MSP for Aberdeen South.