<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def readme_for(self, subpath):
 """ Returns the full path for the README file for the specified subpath, or the root filename if subpath is None. Raises ReadmeNotFoundError if a README for the specified subpath does not exist. Raises werkzeug.exceptions.NotFound if the resulting path would fall out of the root directory. """

        if subpath is None:
            return self.root_filename

        # Join for safety and to convert subpath to normalized OS-specific path
        filename = os.path.normpath(safe_join(self.root_directory, subpath))

        # Check for existence
        if not os.path.exists(filename):
            raise ReadmeNotFoundError(filename)

        # Resolve README file if path is a directory
        if os.path.isdir(filename):
            return self._find_file(filename)

        return filename