code: def catch_oor(fn):
      @functools.wraps(fn)
      def fn_and_catch_oor(*args, **kwargs):
          from triton import OutOfResources
  
          try:
              return fn(*args, **kwargs)
          except OutOfResources as e:
              pytest.skip(str(e))
              return None
  
      return fn_and_catch_oor
  
file_path: xformers/tests/test_triton_blocksparse.py
imports: import functools
  import pytest
  import torch
  import xformers
  from xformers.components import MultiHeadDispatch
  from xformers.components.attention import build_attention
  from xformers.components.attention.attention_patterns import block_sparsify_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: catch_oor(fn) and returns: fn_and_catch_oor, fn, None