code: def is_autocast_enabled(both: bool = True) -> bool:
      """Check if torch autocast is enabled.
  
      Args:
          both: if True will consider autocast region for both types of devices
  
      Returns:
          Return a Bool,
          will always return False for a torch without support, otherwise will be: if both is True
          `torch.is_autocast_enabled() or torch.is_autocast_cpu_enabled()`. If both is False will return just
          `torch.is_autocast_enabled()`.
      """
      if TYPE_CHECKING:
          # TODO: remove this branch when kornia relies on torch >= 1.10.2
          return False
  
      if not torch_version_ge(1, 10, 2):
          return False
  
      if both:
          return (
              torch.is_autocast_enabled()
              or torch.is_autocast_cpu_enabled()
          )
  
      return torch.is_autocast_enabled()
  
imports: import platform
  import sys
  import warnings
  from functools import wraps
  from inspect import isclass, isfunction
  from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Union, overload
  import torch
  from torch.linalg import inv_ex
  from kornia.core import Tensor
  from kornia.utils._compat import torch_version_ge
label_desc: Use image node_id 16 for calling a global function with example usage: is_autocast_enabled(both) and returns: torch, False, False, unknown