<commit_before>import gc
import sys
import time

from django.dispatch import Signal
from django.utils import unittest


if sys.platform.startswith('java'):
    def garbage_collect():
        """Run the garbage collector and wait a bit to let it do his work"""
        gc.collect()
        time.sleep(0.1)
else:
    def garbage_collect():
        gc.collect()

def receiver_1_arg(val, **kwargs):
    return val

class Callable(object):
    def __call__(self, val, **kwargs):
        return val

    def a(self, val, **kwargs):
        return val
<commit_msg>Fix the dispatch test GC code under PyPy, and make the comment for Jython better.<commit_after>import gc
import sys
import time

from django.dispatch import Signal
from django.utils import unittest


if sys.platform.startswith('java'):
    def garbage_collect():
        # Some JVM GCs will execute finalizers in a different thread, meaning
        # we need to wait for that to complete before we go on looking for the
        # effects of that.
        gc.collect()
        time.sleep(0.1)
elif hasattr(sys, "pypy_version_info"):
    def garbage_collect():
        # Collecting weakreferences can take two collections on PyPy.
        gc.collect()
        gc.collect()
else:
    def garbage_collect():
        gc.collect()

def receiver_1_arg(val, **kwargs):
    return val

class Callable(object):
    def __call__(self, val, **kwargs):
        return val

    def a(self, val, **kwargs):
        return val

{'fraction_non_alphanumeric': 0.09128065395095368, 'fraction_numerical': 0.004087193460490463, 'mean_word_length': 2.9069148936170213, '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': '527641', 'n_tokens_mistral': 434, 'n_tokens_neox': 421, 'n_words': 158}