'Shuts down the
:class:`CallbackServer <py4j.java_callback.CallbackServer>`.
:param raise_exception: If `True`, raise an exception if an error
occurs while shutting down (very likely with sockets).'

def shutdown_callback_server(self, raise_exception=False):

    try:
        self._callback_server.shutdown()
    except Exception:
        if raise_exception:
            raise
        else:
            logger.info(u'Exception    while    shutting    down    callback    server', exc_info=True)
