code: def assert_torch_info(torch_info):
      install_torch_version = torch_info["version"]
      install_cuda_version = torch_info["cuda_version"]
      install_hip_version = torch_info["hip_version"]
  
      if not OpBuilder.is_rocm_pytorch():
          current_cuda_version = ".".join(
              torch.version.cuda.split(".")[:2]
          )
      else:
          current_hip_version = ".".join(
              torch.version.hip.split(".")[:2]
          )
  
      current_torch_version = ".".join(torch.__version__.split(".")[:2])
  
      if not OpBuilder.is_rocm_pytorch():
          if (
              install_cuda_version != current_cuda_version
              or install_torch_version != current_torch_version
          ):
              raise RuntimeError(
                  "PyTorch and CUDA version mismatch! DeepSpeed ops were compiled and installed "
                  "with a different version than what is being used at runtime. Please re-install "
                  f"DeepSpeed or switch torch versions. DeepSpeed install versions: "
                  f"torch={install_torch_version}, cuda={install_cuda_version}, runtime versions:"
                  f"torch={current_torch_version}, cuda={current_cuda_version}"
              )
      else:
          if (
              install_hip_version != current_hip_version
              or install_torch_version != current_torch_version
          ):
              raise RuntimeError(
                  "PyTorch and HIP version mismatch! DeepSpeed ops were compiled and installed "
                  "with a different version than what is being used at runtime. Please re-install "
                  f"DeepSpeed or switch torch versions. DeepSpeed install versions: "
                  f"torch={install_torch_version}, hip={install_hip_version}, runtime versions:"
                  f"torch={current_torch_version}, hip={current_hip_version}"
              )
  
imports: import os
  import sys
  import time
  import importlib
  from pathlib import Path
  import subprocess
  import shlex
  import shutil
  import tempfile
  import distutils.ccompiler
  import distutils.log
  import distutils.sysconfig
  from distutils.errors import CompileError, LinkError
  from abc import ABC, abstractmethod
  from typing import List
label_desc: Use image node_id 5 for calling the OpBuilder obj's underlying member method code with example usage: obj.assert_torch_info(torch_info) without return types