def METHOD_NAME(name, parent):
    """Extracted sdist"""
    parent = parent.resolve()
    re_dirname = re.compile(f"{name}-{RE_VERSION}$")
    if not re_dirname.match(parent.name):
        return None
    return Version.parse(parent.name[len(name) + 1 :])