code: def _get_torch_version_upper_limit() -> Tuple[str, str, str]:
      with open("constraints.txt") as f:
          for line in f:
              # The torch version line should look like:
              #   "torch<X.V.0",
              if "torch<" in line:
                  version = tuple(line.split("<")[1].strip().split("."))
                  assert (
                      len(version) == 3
                  ), f"Bad parsed version '{version}'"
                  break
          else:
              raise RuntimeError(
                  "could not find torch version spec in constraints.txt"
              )
      return cast(Tuple[str, str, str], version)
  
imports: from typing import Tuple, cast
label_desc: Use image node_id 4 for calling a global function with example usage: _get_torch_version_upper_limit() and returns: cast