def update_interfaces(self, added_sg, updated_sg, removed_sg):
if not (added_sg or updated_sg or removed_sg):<EOL><INDENT>return<EOL><DEDENT>with self.sessioned() as session:<EOL><INDENT>self._set_security_groups(session, added_sg)<EOL>self._unset_security_groups(session, removed_sg)<EOL>combined = added_sg + updated_sg + removed_sg<EOL>self._refresh_interfaces(session, combined)<EOL><DEDENT>
Handles changes to interfaces' security groups

        Calls refresh_interfaces on argument VIFs. Set security groups on
        added_sg's VIFs. Unsets security groups on removed_sg's VIFs.