def _get_pesid_repos(repo_mapping, pesid, major_version):
    """
    Returns a list of pesid repos with the specified pesid and major version.

    :param str pesid: The PES ID representing the family of repositories.
    :param str major_version: The major version of the RHEL OS.
    :returns: A set of repoids with the specified pesid and major version.
    :rtype: List[PESIDRepositoryEntry]
    """
    pesid_repos = []
    for pesid_repo in repo_mapping.repositories:
        if pesid_repo.pesid == pesid and pesid_repo.major_version == major_version:
            pesid_repos.append(pesid_repo)
    return pesid_repos