code: def _get_latest_torch_version() -> Tuple[str, str, str]:
      import requests
  
      r = requests.get(
          "https://api.github.com/repos/pytorch/pytorch/tags"
      )
      assert r.ok
      for tag_data in r.json():
          tag = tag_data["name"]
          if tag.startswith("v") and "-rc" not in tag:
              # Tag should look like "vX.Y.Z"
              version = tuple(tag[1:].split("."))
              assert (
                  len(version) == 3
              ), f"Bad parsed version '{version}'"
              break
      else:
          raise RuntimeError("could not find latest stable release tag")
      return cast(Tuple[str, str, str], version)
  
imports: from typing import Tuple, cast
label_desc: Use image node_id 3 for calling a global function with example usage: _get_latest_torch_version() and returns: cast