'Return True if the latest installable changeset_revision of the received repository is level one certified.'

def get_certified_level_one_tuple(self, repository):

    if (repository is None):
        return (None, False)
    if (repository.deleted or repository.deprecated):
        return (None, False)
    repo = hg_util.get_repo_for_repository(self.app, repository=repository, repo_path=None, create=False)
    latest_installable_changeset_revision = metadata_util.get_latest_downloadable_changeset_revision(self.app, repository, repo)
    if (latest_installable_changeset_revision not in [None, hg_util.INITIAL_CHANGELOG_HASH]):
        encoded_repository_id = self.app.security.encode_id(repository.id)
        repository_metadata = metadata_util.get_repository_metadata_by_changeset_revision(self.app, encoded_repository_id, latest_installable_changeset_revision)
        if repository_metadata:
            return (latest_installable_changeset_revision, True)
    else:
        return (None, False)
