  def GetOptionFromUser(self) -> Optional[PromptOption]:
    """Override of abstract method. Prompts the user with yes/no question."""
    choices = ['y', 'n']
    if self._default_yes is not None:
      # A default has been set, user may skip the prompt
      choices.append('')
    selection = None
    while selection not in choices:
      logger.info('{0:s}\n'.format(self._option.ToQuestion()))
      logger.info('Choose one {0:s}: '.format(self._ChoicesString()))
      selection = input().lower()
    if selection == '':
      answered_yes = self._default_yes
    else:
      answered_yes = selection == 'y'
    return self._option if answered_yes else None
Override of abstract method. Prompts the user with yes/no question.
libcloudforensics/prompts.py