code: def _parse_version_parts(s):
      for part in _legacy_version_component_re.split(s):
          part = _legacy_version_replacement_map.get(part, part)
  
          if not part or part == ".":
              continue
  
          if part[:1] in "0123456789":
              # pad for numeric comparison
              yield part.zfill(8)
          else:
              yield "*" + part
  
      # ensure that alpha/beta/candidate are before final
      yield "*final"
  
imports: from __future__ import absolute_import, division, print_function
  import collections
  import itertools
  import re
  from ._structures import Infinity
label_desc: Use image node_id 2 for calling a global function with example usage: _parse_version_parts(s) without return types