code: def _can_use_flash_sdpa_jagged(
      params: SDPAParams, debug=False
  ) -> bool:
      constraints = (
          _check_batch_size_nested,
          _check_head_dim_size_flash_nested,
          _check_for_seq_len_0_nested,
      )
      for constraint in constraints:
          if not constraint(params, debug):
              return False
      return True
  
imports: import logging
  import math
  from typing import Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.backends.cuda import can_use_efficient_attention, can_use_flash_attention, flash_sdp_enabled, math_sdp_enabled, mem_efficient_sdp_enabled, SDPAParams, SDPBackend
  from .nested_tensor import buffer_from_jagged, NestedTensor, ViewNestedFromBuffer
label_desc: Use image node_id 7 for calling a global function with example usage: _can_use_flash_sdpa_jagged(params, debug) and returns: True, False