Under what conditions would a KeyError be raised (ie which lines could raise the error)?