The county legislative body is hereby granted discretionary authority to create the office of county coroner. If such office is created, the county legislative body shall elect a coroner who shall hold office for two (2) years, and until a successor is qualified. However, in those counties that have a county medical examiner, the county legislative body may vest the duties of the county coroner in the county medical examiner and shall not be required to elect a county coroner.