def get_conda_env_data(mgr):
if not mgr.find_conda_envs:<EOL><INDENT>return {}<EOL><DEDENT>mgr.log.debug("<STR_LIT>", mgr.conda_env_dirs)<EOL>env_paths = find_env_paths_in_basedirs(mgr.conda_env_dirs)<EOL>env_paths.extend(_find_conda_env_paths_from_conda(mgr))<EOL>env_paths = list(set(env_paths)) <EOL>mgr.log.debug("<STR_LIT>")<EOL>env_data = convert_to_env_data(mgr=mgr,<EOL>env_paths=env_paths,<EOL>validator_func=validate_IPykernel,<EOL>activate_func=_get_env_vars_for_conda_env,<EOL>name_template=mgr.conda_prefix_template,<EOL>display_name_template=mgr.display_name_template,<EOL>name_prefix="<STR_LIT>")  <EOL>if mgr.find_r_envs:<EOL><INDENT>mgr.log.debug("<STR_LIT>")<EOL>env_data.update(convert_to_env_data(mgr=mgr,<EOL>env_paths=env_paths,<EOL>validator_func=validate_IRkernel,<EOL>activate_func=_get_env_vars_for_conda_env,<EOL>name_template=mgr.conda_prefix_template,<EOL>display_name_template=mgr.display_name_template,<EOL>name_prefix="<STR_LIT>"))<EOL><DEDENT>return env_data<EOL>
Finds kernel specs from conda environments

    env_data is a structure {name -> (resourcedir, kernel spec)}