code: def get_torch_dtype_from_string(dtype: str) -> torch.dtype:
      """Get a torch dtype (e.g., `torch.float32`) from its string (e.g., `"float32"`)."""
      return dtype_numpy_to_torch(get_numpy_dtype_from_string(dtype))
  
imports: from __future__ import annotations
  import re
  from collections.abc import Sequence
  from typing import Any
  import numpy
  import torch
  import monai
  from monai.config.type_definitions import DtypeLike, NdarrayTensor
  from monai.utils import optional_import
label_desc: Use image node_id 2 for calling a global function with example usage: get_torch_dtype_from_string(dtype) and returns: dtype_numpy_to_torch