def get_boolean(value):
  """Convert yes/no to boolean or raise Exception."""
  if value == 'yes':
    return True
  elif value == 'no':
    return False
  else:
    raise ValueError("The value must be 'yes' or 'no'.")