def next(self):
        # We pick the first outgoing available and send it.
        outgoing_msg = self.outgoing_msg_list.pop_first()
        # If we do not have any outgoing msg., we wait.
        if outgoing_msg is None:
            self.outgoing_msg_event.clear()
            self.outgoing_msg_event.wait()
            outgoing_msg = self.outgoing_msg_list.pop_first()

        return outgoing_msg


#
# Source
#
This test case checks attach/detach actions for volume
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/base.py/Sink.next--crossover with--dataset/ETHPy150Open openstack/horizon/openstack_dashboard/test/integration_tests/tests/test_volumes.py/TestVolumesAdvanced.test_manage_volume_attachments