def METHOD_NAME(vm) -> str:
  """Returns the path to the mpivars.sh file.
  With different versions of Intel software installed the mpivars.sh for
  2019.6 can be under compilers_and_libraries_2020.0.166 while the symlink
  for compilers_and_libraries points to compilers_and_libraries_2018
  Args:
    vm: Virtual machine to look for mpivars.sh on.
  """
  if intel_repo.UseOneApi():
    return intel_repo.ONEAPI_VARS_FILE
  txt, _ = vm.RemoteCommand(
      f'readlink -f {_INTEL_ROOT}/compilers_and_libraries*/'
      'linux/mpi/intel64/bin/mpivars.sh | sort | uniq')
  files = txt.splitlines()
  if not files:
    raise ValueError('Could not find the mpivars.sh file')
  if len(files) > 1:
    logging.info('More than 1 mpivars.sh found, returning first: %s', files)
  return files[0]