def find_version(filename):
with open(filename, "<STR_LIT:r>") as filep:<EOL><INDENT>version_file = filep.read()<EOL>version_match = re.search(<EOL>r"<STR_LIT>", version_file, re.M<EOL>)<EOL>if version_match:<EOL><INDENT>return version_match.group(<NUM_LIT:1>)<EOL><DEDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>
Search for assignment of __version__ string in given file and
return what it is assigned to.