'if a course is blacklist for two countries then course can be accessible from
any where except these two countries.
if a course is whitelist for two countries then course can be accessible from
these countries only.
Args:
course_id (str): course_id to look for
Returns:
List
Consolidated list of accessible countries for given course'

@classmethod
def _get_country_access_list(cls, course_id):

    whitelist_countries = set()
    blacklist_countries = set()
    rules_for_course = CountryAccessRule.objects.select_related('country').filter(restricted_course__course_key=course_id)
    for rule in rules_for_course:
        if (rule.rule_type == cls.WHITELIST_RULE):
            whitelist_countries.add(rule.country.country.code)
        elif (rule.rule_type == cls.BLACKLIST_RULE):
            blacklist_countries.add(rule.country.country.code)
    if (not whitelist_countries):
        whitelist_countries = cls.ALL_COUNTRIES
    return list((whitelist_countries - blacklist_countries))
