<commit_before>""" A cached-property for decorating methods in classes.

Source: https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/utils.py
"""


class cached_property(object):
    """A decorator that converts a function into a lazy property.  The
    function wrapped is called the first time to retrieve the result
    and then that calculated result is used the next time you access
    the value::

        class Foo(object):

            @cached_property<commit_msg> _missing was lost, so added it back<commit_after>""" A cached-property for decorating methods in classes.

Source: https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/utils.py
"""

# sentinel
_missing = object()


class cached_property(object):
    """A decorator that converts a function into a lazy property.  The
    function wrapped is called the first time to retrieve the result
    and then that calculated result is used the next time you access
    the value::

        class Foo(object):

            @cached_property
{'fraction_non_alphanumeric': 0.07586206896551724, 'fraction_numerical': 0.0, 'mean_word_length': 3.495575221238938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2531525', 'n_tokens_mistral': 273, 'n_tokens_neox': 267, 'n_words': 111}