def _by_version(name):
        """
        Parse each component of the filename
        """
        name, ext = os.path.splitext(name)
        parts = itertools.chain(name.split('-'), [ext])
        return [packaging.version.parse(part) for part in parts]

        Parse each component of the filename
        
product/gradle-plugin/src/main/python/pip/_vendor/pkg_resources/__init__.py