def _get_free_listen_port(self):
        # python 2.x doesn't have __enter__ and __exit__ on socket objects
        # so can't use with: clauses
        # Yes, there is a race condition between closing the socket and
        # starting mosquitto.
        s = socket.socket()
        s.bind(("localhost", 0))
        chosen_port = s.getsockname()[1]
        s.close()
        return chosen_port
Take in the tag from an event and return a list of the reactors to
dataset/ETHPy150Open remakeelectric/mqtt-malaria/beem/bridge.py/MosquittoBridgeBroker._get_free_listen_port--crossover with--dataset/ETHPy150Open saltstack/salt/salt/utils/reactor.py/Reactor.list_reactors