def enable(instrumentation_key, *args, **kwargs):
    """Enables the Application Insights logging handler for the root logger for the supplied instrumentation key.
    Multiple calls to this function with different instrumentation keys result in multiple handler instances.

    .. code:: python

        import logging
        from applicationinsights.logging import enable

        # set up logging
        enable('<YOUR INSTRUMENTATION KEY GOES HERE>')

        # log something (this will be sent to the Application Insights service as a trace)
        logging.info('This is a message')

        # logging shutdown will cause a flush of all un-sent telemetry items
        # alternatively set up an async channel via enable('<YOUR INSTRUMENTATION KEY GOES HERE>', telemetry_channel=...)

    Args:
        instrumentation_key (str). the instrumentation key to use while sending telemetry to the service.

    Returns:
        :class:`ApplicationInsightsHandler`. the newly created or existing handler.
    """
    if not instrumentation_key:
        raise Exception('Instrumentation key was required but not provided')
    if enabled_instrumentation_keys in instrumentation_key:
        logging.getLogger().removeHandler(enabled_instrumentation_keys[instrumentation_key])
    handler = LoggingHandler(instrumentation_key, *args, **kwargs)
    handler.setLevel(logging.INFO)
    enabled_instrumentation_keys[instrumentation_key] = handler
    logging.getLogger().addHandler(handler)
    return handler
dataset/ETHPy150Open Microsoft/ApplicationInsights-Python/applicationinsights/logging/LoggingHandler.py/enable/swapped operands of `in`