How do you collect sermen(sperms) for analysis?

HOW DO YOU COLLECT SERMEN(SPERMS) FOR ANALYSIS ?

The man has to abstain from sex for at least 48 hrs but other literature says for a week
The semen sample has to be obtained by means of masturbation and not thru withdrawal or other forms to avoid sample contamination and collecting insufficient sample…after it’s collected, it has to be submitted to the lab within the 30 min to avoid lossing it texture and probably killing the sperm cells

D guy has to mastubate by himself, through d help of a girl.
But protection wont be used coz of d chemicals