<commit_before>from .helpers import Every, meanwhile


class heartbeat_on(object):
    def __init__(self, heartbeat, interval):
        self._heartbeat = heartbeat
        self._interval = interval

    def __call__(self, func):
        from functools import wraps

        @wraps(func)
        def with_heartbeat(*args, **kwargs):
            return meanwhile(Every(self._interval, self._heartbeat),
                             func, *args, **kwargs)

        return with_heartbeat
<commit_msg>Fix swf.actors.heartbeat.heartbeat_on: pass args and kwargs<commit_after>from .helpers import Every, meanwhile


class heartbeat_on(object):
    def __init__(self, heartbeat, interval):
        self._heartbeat = heartbeat
        self._interval = interval

    def __call__(self, func):
        from functools import wraps

        @wraps(func)
        def with_heartbeat(*args, **kwargs):
            return meanwhile(Every(self._interval,
                                   self._heartbeat, *args, **kwargs),
                             func, *args, **kwargs)

        return with_heartbeat

{'fraction_non_alphanumeric': 0.0889908256880734, 'fraction_numerical': 0.0, 'mean_word_length': 2.286144578313253, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7426004', 'n_tokens_mistral': 299, 'n_tokens_neox': 281, 'n_words': 75}