def __init__(self, request, in_type="type", out_type="type", debug=False,
                 json_dumps=None, json_loads=None):
        self.request = request
        self.io = request.environ['socketio']
        if json_dumps:
            self.io.dumps = json_dumps
        if json_loads:
            self.io.loads = json_loads
        self._parent = None
        self._in_type = in_type
        self._out_type = out_type
        self._on_disconnect = []
        self.id = self.io.session.session_id
        if not hasattr(request, 'jobs'):
            request.jobs = []

        # Override self.debug if in production mode
        if not debug:
            self.debug = lambda x: None
Checks whether an IP address is reachable by pinging.
dataset/ETHPy150Open abourget/pyramid_socketio/pyramid_socketio/io.py/SocketIOContext.__init__--crossover with--dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/plugins/cisco/cfg_agent/device_status.py/_is_pingable