'Check that self.direction is in (KeyRange.ASC, KeyRange.DESC).
Args:
asc: Argument to return if self.direction is KeyRange.ASC
desc: Argument to return if self.direction is KeyRange.DESC
Returns:
asc or desc appropriately
Raises:
KeyRangeError: if self.direction is not in (KeyRange.ASC, KeyRange.DESC).'

def __get_direction(self, asc, desc):

    if (self.direction == KeyRange.ASC):
        return asc
    elif (self.direction == KeyRange.DESC):
        return desc
    else:
        raise KeyRangeError('KeyRange    direction    unexpected:    %s', self.direction)
