def get_version():
import ast<EOL>with open(os.path.join("<STR_LIT>", "<STR_LIT>"), "<STR_LIT:r>") as init_file:<EOL><INDENT>module = ast.parse(init_file.read())<EOL><DEDENT>version = (ast.literal_eval(node.value) for node in ast.walk(module)<EOL>if isinstance(node, ast.Assign)<EOL>and node.targets[<NUM_LIT:0>].id == "<STR_LIT>")<EOL>try:<EOL><INDENT>return next(version)<EOL><DEDENT>except StopIteration:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>
Get the version info from the mpld3 package without importing it