code: def prompt(prompt_string, default=None, secret=False, boolean=False, bool_type=None):
      
      if boolean or bool_type in BOOLEAN_DEFAULTS:
          if bool_type is None:
              bool_type = 'y_n'
          default_msg = BOOLEAN_DEFAULTS[bool_type][is_affirmative(default)]
      else:
          default_msg = " (default {val}): "
      prompt_string += (default_msg.format(val=default) if default else ": ")
      if secret:
          val = getpass(prompt_string)
      else:
          val = input(prompt_string)
      val = (val if val else default)
      if boolean:
          val = val.lower().startswith('y')
      return val
docs: Prompt user for a string, with a default value
  
      * secret converts to password prompt
      * boolean converts return value to boolean, checking for starting with a Y