code: def cugraph_update_asv(
      asvDir,
      datasetName,
      algoRunResults,
      cudaVer="",
      pythonVer="",
      osType="",
      machineName="",
      repo="",
  ):
      """
      algoRunResults is a list of (algoName, exeTime) tuples
      """
      (commitHash, commitTime) = getCommitInfo()
      (actualRepo, branch) = getRepoInfo()
      repo = repo or actualRepo
  
      db = ASVDb(asvDir, repo, [branch])
  
      uname = platform.uname()
  
      prefixDict = dict(
          maxGpuUtil="gpuutil",
          maxGpuMemUsed="gpumem",
          exeTime="time",
      )
      unitsDict = dict(
          maxGpuUtil="percent",
          maxGpuMemUsed="bytes",
          exeTime="seconds",
      )
  
      bInfo = BenchmarkInfo(
          machineName=machineName or uname.machine,
          cudaVer=cudaVer or "unknown",
          osType=osType or "%s %s" % (uname.system, uname.release),
          pythonVer=pythonVer or platform.python_version(),
          commitHash=commitHash,
          commitTime=commitTime,
          gpuType="unknown",
          cpuType=uname.processor,
          arch=uname.machine,
          ram="%d" % psutil.virtual_memory().total,
      )
  
      validKeys = set(list(prefixDict.keys()) + list(unitsDict.keys()))
  
      for funcName, metricsDict in algoRunResults.items():
          for metricName, val in metricsDict.items():
              # If an invalid metricName is present (likely due to a benchmark
              # run error), skip
              if metricName in validKeys:
                  bResult = BenchmarkResult(
                      funcName="%s_%s"
                      % (funcName, prefixDict[metricName]),
                      argNameValuePairs=[("dataset", datasetName)],
                      result=val,
                  )
                  bResult.unit = unitsDict[metricName]
                  db.addResult(bInfo, bResult)
  
imports: import platform
  import psutil
  from asvdb import BenchmarkInfo, BenchmarkResult, ASVDb
  from utils import getCommitInfo, getRepoInfo
label_desc: Use image node_id 1 for calling a global function with example usage: cugraph_update_asv(asvDir, datasetName, algoRunResults, cudaVer, pythonVer, osType, machineName, repo) without return types