ddtrace/contrib/celery/utils.py
def detach_span(task, task_id):
    """Helper to remove a `Span` in a Celery task when it's propagated.
    This function handles tasks where the `Span` is not attached.
    """
    weak_dict = getattr(task, CTX_KEY, None)
    if weak_dict is None:
        return

    weak_dict.pop(task_id, None)
Helper to remove a `Span` in a Celery task when it's propagated.
    This function handles tasks where the `Span` is not attached.
    
Helper to remove a `Span` in a Celery task when it's propagated.
This function handles tasks where the `Span` is not attached.
Helper to remove a ` Span ` in a Celery task when it ' s propagated . This function handles tasks where the ` Span ` is not attached .
def detach_span(task, task_id):
    weak_dict = getattr(task, CTX_KEY, None)
    if weak_dict is None:
        return
    weak_dict.pop(task_id, None)
def detach_span ( task , task_id ) : weak_dict = getattr ( task , CTX_KEY , None ) if weak_dict is None : return weak_dict . pop ( task_id , None )
Helper to remove a `Span` in a Celery task when it's propagated.
Helper to remove a ` Span ` in a Celery task when it ' s propagated .
"""Helper to remove a `Span` in a Celery task when it's propagated.
    This function handles tasks where the `Span` is not attached.
    """
task
task_id