def _parse_numdots(self, s, full_ver_str, drop_trailing_zeros=True,
                       pad_zeros_length=0):
        nums = []
        for n in s.split("."):
            if len(n) > 1 and n[0] == '0':
                raise IrrationalVersionError("cannot have leading zero in "
                    "version number segment: '%s' in %r" % (n, full_ver_str))
            nums.append(int(n))
        if drop_trailing_zeros:
            while nums and nums[-1] == 0:
                nums.pop()
        while len(nums) < pad_zeros_length:
            nums.append(0)
        return nums
Test for Return the first match in a dictionary of target patterns
dataset/ETHPy150Open crate-archive/crate-site/crateweb/apps/packages/utils/verlib.py/NormalizedVersion._parse_numdots--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/match_test.py/MatchTestCase.test_filter_by