<commit_before>import time
import traceback
import threading
import collections

from synapse.compat import queue

import synapse.dyndeps as s_dyndeps
import synapse.lib.sched as s_sched
import synapse.lib.scope as s_scope
import synapse.lib.queue as s_queue
import synapse.lib.threads as s_threads

from synapse.common import *
from synapse.eventbus import EventBus

def jobid():
    return guid()

def jobret(job):
    '''
    Return job result or raise on error.

    Example:

        return jobret(job)

    '''
    err = job[1].get('err')
    if err != None:
        if err != 'NameErr':
            try:
                raise synerr(err)
            except NameError as e:
                pass
        raise JobErr(job)
    return job[1].get('ret')

def jobDoneMesg(job):<commit_msg>Remove unused imports from async.py<commit_after>import synapse.lib.sched as s_sched
import synapse.lib.scope as s_scope
import synapse.lib.threads as s_threads

from synapse.common import *
from synapse.eventbus import EventBus

def jobid():
    return guid()

def jobret(job):
    '''
    Return job result or raise on error.

    Example:

        return jobret(job)

    '''
    err = job[1].get('err')
    if err != None:
        if err != 'NameErr':
            try:
                raise synerr(err)
            except NameError as e:
                pass
        raise JobErr(job)
    return job[1].get('ret')

def jobDoneMesg(job):
{'fraction_non_alphanumeric': 0.09020979020979021, 'fraction_numerical': 0.002797202797202797, 'mean_word_length': 2.4399038461538463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5348813', 'n_tokens_mistral': 447, 'n_tokens_neox': 436, 'n_words': 137}