code: def is_sdpa_error(func, idx, e):
      if (
          (
              func is aten._scaled_dot_product_flash_attention.default
              or func is aten._flash_attention_forward.default
          )
          and idx in (6, 7)
          and "Devices" in repr(e)
      ):
          return True
      if (
          (
              func
              is aten._scaled_dot_product_efficient_attention.default
              or func is aten._efficient_attention_forward.default
          )
          and idx in (2, 3)
          and "Devices" in repr(e)
      ):
          return True
      return False
  
file_path: pytorch/torch/_subclasses/fake_utils.py
imports: import functools
  import warnings
  from typing import Callable, Union
  import torch
  import torch.utils._pytree
  from torch._ops import OpOverload
  from torch._subclasses.fake_tensor import FakeTensorMode, tree_flatten_only, UnsupportedFakeTensorException
  from torch.utils._python_dispatch import TorchDispatchMode
label_desc: Use image node_id 4 for calling a global function with example usage: is_sdpa_error(func, idx, e) and returns: False, True, True