<commit_before>#!/usr/bin/env python
# vim: set sts=4 sw=4 et:

import random
import copy
import rpc

# game mode
NOLO = 0
RAMI = 1

# game state
STOPPED = 0
VOTING = 1
ONGOING = 2

TURN_NONE = -1

class GameError(Exception):
    """
    Generic error class for game errors.
    """<commit_msg>add traced decorator to common.py<commit_after>#!/usr/bin/env python
# vim: set sts=4 sw=4 et:

import random
import copy
import rpc

# game mode
NOLO = 0
RAMI = 1

# game state
STOPPED = 0
VOTING = 1
ONGOING = 2

TURN_NONE = -1


def traced(func):
    """
    A decorator for tracing func calls.
    """
    def wrapper(*args, **kwargs):
        print "DEBUG: entering %s()" % func.__name__
        retval = func(*args, **kwargs)
        return retval

    wrapper.__name__ = func.__name__
    wrapper.__dict__ = func.__dict__
    wrapper.__doc__ = func.__doc__

    return wrapper


class GameError(Exception):
    """
    Generic error class for game errors.
    """
{'fraction_non_alphanumeric': 0.11007268951194185, 'fraction_numerical': 0.016614745586708203, 'mean_word_length': 2.8714859437751006, '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': '4355210', 'n_tokens_mistral': 353, 'n_tokens_neox': 332, 'n_words': 107}