def find_yang_file(profile, filename, path):
<EOL>module_dir = os.path.dirname(__file__)<EOL>full_path = os.path.join(module_dir, "<STR_LIT>", profile, path, filename)<EOL>if os.path.exists(full_path):<EOL><INDENT>return full_path<EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>".format(full_path)<EOL>logger.error(msg)<EOL>raise IOError(msg)<EOL><DEDENT>
Find the necessary file for the given test case.

Args:
    device(napalm device connection): for which device
    filename(str): file to find
    path(str): where to find it relative to where the module is installed