(b) Except where a contest or candidate is removed from the ballot by court order too late to make complete compliance with this paragraph feasible, the title of each public office or party position and the names of the candidates for such office or position appearing on any ballot used for primary elections over which the county board of elections has jurisdiction shall appear on such ballot immediately adjacent to one another, either horizontally or vertically; and no blank spaces shall separate the names of candidates actually running for an office or party position on such ballot, and no blank spaces shall separate any two such offices or positions which appear on such ballot in the same column or row. * NB Effective July 1, 2020 7. Whenever a county board of elections or the board of elections in the city of New York must conduct a primary election in the respective county or the city of New York in which separate contests for both male and female candidates for the same party position are to be printed upon the ballots, the respective county board of elections or the board of elections in the city of New York shall determine by lot whether to first print the contest for the male candidates or the contest for the female candidates. After such determination, the same order shall be used for all ballots printed by the board of elections for the entire county or city of New York and for all contests where there are elections separated by male and female candidates for the same party position.