def select_release(self, highest_allowed_release):
matching_releases = []<EOL>highest_allowed_key = natsort_key(highest_allowed_release)<EOL>for release in self.ordered_releases:<EOL><INDENT>release_key = natsort_key(release.identifier)<EOL>if release_key <= highest_allowed_key:<EOL><INDENT>matching_releases.append(release)<EOL><DEDENT><DEDENT>if not matching_releases:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise NoMatchingReleasesError(msg % highest_allowed_release)<EOL><DEDENT>return matching_releases[-<NUM_LIT:1>]<EOL>
Select the newest release that is not newer than the given release.

:param highest_allowed_release: The identifier of the release that sets
                                the upper bound for the selection (a
                                string).
:returns: The identifier of the selected release (a string).
:raises: :exc:`~vcs_repo_mgr.exceptions.NoMatchingReleasesError`
         when no matching releases are found.