code: def get_filename(key, message, default=None, history=None):
      
      def _validate(string):
          if not os.path.isfile(string):
              return 'File not found. Please enter a filename.'
      return prompt(key, message, default, True, _validate, history)
docs: Like :meth:`prompt`, but only accepts the name of an existing file
      as an input.
  
      :type  key: str
      :param key: The key under which to store the input in the :class:`InputHistory`.
      :type  message: str
      :param message: The user prompt.
      :type  default: str|None
      :param default: The offered default if none was found in the history.
      :type  history: :class:`InputHistory` or None
      :param history: The history used for recording default values, or None.