def selectTorrentsToCollect(self, infohashes): to_collect = ChannelCommunity.selectTorrentsToCollect(self, infohashes) #Reducing the number of samples to collect for unsubscribed channels if len(to_collect) > 2: return sample(to_collect, 2) return to_collect