def validate_IRkernel(venv_dir):
r_exe_name = find_exe(venv_dir, "<STR_LIT:R>")<EOL>if r_exe_name is None:<EOL><INDENT>return [], None, None<EOL><DEDENT>import subprocess<EOL>ressources_dir = None<EOL>try:<EOL><INDENT>print_resources = '<STR_LIT>'<EOL>resources_dir_bytes = subprocess.check_output([r_exe_name, '<STR_LIT>', '<STR_LIT>', print_resources])<EOL>resources_dir = resources_dir_bytes.decode(errors='<STR_LIT:ignore>')<EOL><DEDENT>except:<EOL><INDENT>return [], None, None<EOL><DEDENT>argv = [r_exe_name, "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL>if not os.path.exists(resources_dir.strip()):<EOL><INDENT>resources_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "<STR_LIT>", "<STR_LIT:r>")<EOL><DEDENT>return argv, "<STR_LIT:r>", resources_dir<EOL>
Validates that this env contains an IRkernel kernel and returns info to start it


    Returns: tuple
        (ARGV, language, resource_dir)