'Calculate which security groups need to be removed.
We find out by subtracting our previous sg group ids,
with the security groups associated to a set of ports.'

def _determine_sg_rules_to_remove(self, filtered_ports):

    port_group_ids = self._get_sg_ids_set_for_ports(filtered_ports)
    return (set(self.pre_sg_rules) - port_group_ids)
