import re


def CheckNvidiaGpuExists(vm):
  """Returns whether NVIDIA GPU exists or not."""
  vm.Install('pciutils')
  output, _ = vm.RemoteCommand('sudo lspci', should_log=True)
  regex = re.compile(r'3D controller: NVIDIA Corporation')
  return regex.search(output) is not None