human
Complete this python program:
def _by_version_descending(names):
assistant
#Here is the Python code you requested.

    """Given a list of filenames, return them in descending order
    by version number.
    >>> names = \bar\, \foo\, \Python-2.7.10.egg\, \Python-2.7.2.egg\
    >>> _by_version_descending(names)
    [\Python-2.7.10.egg\, \Python-2.7.2.egg\, \foo\, \bar\]
    >>> names = \Setuptools-1.2.3b1.egg\, \Setuptools-1.2.3.egg\
    >>> _by_version_descending(names)
    [\Setuptools-1.2.3.egg\, \Setuptools-1.2.3b1.egg\]
    >>> names = \Setuptools-1.2.3b1.egg\, \Setuptools-1.2.3.post1.egg\
    >>> _by_version_descending(names)
    [\Setuptools-1.2.3.post1.egg\, \Setuptools-1.2.3b1.egg\]
    """
    def _by_version(name):
        '\n                                Parse    each    component    of    the    filename\n                                '
        (name, ext) = os.path.splitext(name)
        parts = itertools.chain(name.split('-'), [ext])
        return [packaging.version.parse(part) for part in parts]
    return sorted(names, key=_by_version, reverse=True)