def find_file(search_dir, file_pattern):
for root, dirnames, fnames in os.walk(search_dir):<EOL><INDENT>for fname in fnames:<EOL><INDENT>if fnmatch.fnmatch(fname, file_pattern):<EOL><INDENT>return os.path.join(root, fname)<EOL><DEDENT><DEDENT><DEDENT>return "<STR_LIT>"<EOL>
Search for a file in a directory, and return the first match.
If the file is not found return an empty string

Args:
    search_dir: The root directory to search in
    file_pattern: A unix-style wildcard pattern representing
        the file to find

Returns:
    The path to the file if it was found, otherwise an empty string