def get_version_from_dirname(name, parent):
parent = parent.resolve()<EOL>re_dirname = re.compile(f"<STR_LIT>")<EOL>if not re_dirname.match(parent.name):<EOL><INDENT>return None<EOL><DEDENT>return Version.parse(parent.name[len(name) + <NUM_LIT:1> :])<EOL>
Extracted sdist