def remove_from_cluster(self, item):
        """ Removes if exists in the cluster        
            
        """
        textid = item[0]
        text = item[1]
        
        exists = self.members.pop(textid, False)
        
        if exists:
            words = text.split()   
            for word in words:
                index = self.feature_idx[word]
                if index < len(self.feature_vector):
                    self.feature_vector[index] -= 1
 Removes if exists in the cluster        
            
        
pytorch_clusters.py