<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals


class Package(object):
    def __init__(self, name):
        self.name = name
        self._versions = None

    @property
    def versions(self):
        if self._versions is None:
            self._complete_lazy()
        return self.versions

    def _complete_lazy(self):
        self._versions = ["1.2"]<commit_msg>prototyping<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from pkg_resources import parse_version

class Package(object):
    def __init__(self, name):
        self.name = name
        self._versions = None

    @property
    def versions(self):
        if self._versions is None:
            self._complete_lazy()
        return self._versions

    def _complete_lazy(self):
        self._versions = ["1.2"]

    def latest_version(self, prereleases=False):
        for version in self.versions:
            if prereleases or not parse_version(version).is_prerelease:
                return version
        # we have not found a version here, we might find one in prereleases
        if self.versions and not prereleases:
            return self.latest_version(prereleases=True)
        return None

{'fraction_non_alphanumeric': 0.0839753466872111, 'fraction_numerical': 0.004622496147919877, 'mean_word_length': 2.5785123966942147, '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': '714395', 'n_tokens_mistral': 371, 'n_tokens_neox': 347, 'n_words': 103}