<commit_before>import asyncio
import threading


class Tasks:
    loop = asyncio.new_event_loop()

    @classmethod
    def _run(cls):
        try:
            cls.loop.run_forever()
        finally:
            cls.loop.close()

    @classmethod
    def do(cls, func, *args, **kwargs):
        cls.loop.call_soon(lambda: func(*args, **kwargs))
        cls.loop._write_to_self()

    @classmethod
    def later(cls, func, *args, after=None, **kwargs):<commit_msg>Set implicit loop for Python <3.6<commit_after>import asyncio
import threading


class Tasks:
    loop = asyncio.new_event_loop()

    @classmethod
    def _run(cls):
        asyncio.set_event_loop(cls.loop)

        try:
            cls.loop.run_forever()
        finally:
            cls.loop.close()

    @classmethod
    def do(cls, func, *args, **kwargs):
        cls.loop.call_soon(lambda: func(*args, **kwargs))
        cls.loop._write_to_self()

    @classmethod
    def later(cls, func, *args, after=None, **kwargs):
{'fraction_non_alphanumeric': 0.12550607287449392, 'fraction_numerical': 0.0020242914979757085, 'mean_word_length': 2.5448028673835124, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2153820', 'n_tokens_mistral': 333, 'n_tokens_neox': 323, 'n_words': 69}