def METHOD_NAME(self, repository_names):
    res = set(repository_names)
    if self.repository_whitelist:
        res &= set(self.repository_whitelist)
    res -= set(self.repository_blacklist)
    return res