code: def x_fail_if_ice(func):
      @functools.wraps(func)
      def wrapper(*args, **kwargs):
          try:
              return func(*args, **kwargs)
          except Exception as e:
              if "CapacityError" in str(e):
                  pytest.xfail(str(e))
              raise
  
      return wrapper
  
imports: from __future__ import absolute_import
  import functools
  import json
  import uuid
  from typing import Any, Dict, List, Tuple
  import boto3
  import pandas
  import os
  from botocore.config import Config
  import pytest
  from tests.integ.sagemaker.jumpstart.constants import TEST_ASSETS_SPECS, TMP_DIRECTORY_PATH, TRAINING_DATASET_MODEL_DICT, ContentType
  from sagemaker.jumpstart.constants import JUMPSTART_DEFAULT_REGION_NAME
  from sagemaker.jumpstart.utils import get_jumpstart_content_bucket
  from sagemaker.session import Session
label_desc: Use image node_id 5 for calling a global function with example usage: x_fail_if_ice(func) and returns: wrapper, func