def _find_file(filename):
import os<EOL>if os.path.exists(filename):<EOL><INDENT>path = filename<EOL><DEDENT>else:<EOL><INDENT>path = os.path.dirname(__file__)<EOL>path = os.path.join(path, '<STR_LIT:data>', filename)<EOL><DEDENT>if not os.path.exists(path):<EOL><INDENT>raise ValueError("<STR_LIT>" %filename)<EOL><DEDENT>return path<EOL>
Find the file path, first checking if it exists and then looking in the
data directory