In any case in which an autopsy or postmortem is performed, the coroner or medical examiner, upon his or her own authority or upon the request of the prosecuting attorney or other law enforcement agency having jurisdiction, may make or cause to be made an analysis of the stomach contents, blood, or organs, or tissues of a deceased person and secure professional opinions thereon and retain or dispose of any specimens or organs of the deceased which in his or her discretion are desirable or needful for anatomic, bacteriological, chemical, or toxicological examination or upon lawful request are needed or desired for evidence to be presented in court. Costs shall be borne by the county.