code: def get_chart_version(repo="milvus/milvus", app_version="2.2.0"):
      """
      Get helm chart version by app version
      """
      if app_version.startswith("v"):
          app_version = app_version[1:]
      cmd = f"helm search repo {repo} -l -o json"
      result = subprocess.check_output(cmd, shell=True)
      result = json.loads(result)
      all_chart_versions = []
      for item in result:
          if item["app_version"] == app_version:
              all_chart_versions.append(item["version"])
      if len(all_chart_versions) == 0:
          raise Exception(
              f"Cannot find helm chart version for app version {app_version}"
          )
      all_chart_versions.sort()
      result = all_chart_versions[-1]
      return result
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_chart_version(repo, app_version) and returns: result