Here’s a look at the AP’s role and its process for determining the outcome of elections, also known as calling a race.