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