def with_current_context(func: Callable) -> Any:
    """Passes the current spans to the new context the function will be run in.

    :param func: The function that will be run in the new context
    :type func: callable
    :return: The func wrapped with correct context
    :rtype: callable
    """
    span_impl_type: Optional[Type[AbstractSpan]] = settings.tracing_implementation()
    if span_impl_type is None:
        return func

    return span_impl_type.with_current_context(func)
Passes the current spans to the new context the function will be run in.

    :param func: The function that will be run in the new context
    :type func: callable
    :return: The func wrapped with correct context
    :rtype: callable
    
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/tracing/common.py