When the former Egyptian president Mohamed Morsi was sentenced to 20 years in April, in a trial internationally condemned as unconstitutional, unfair and deeply politicised,