code: def should_retry(exception: Exception):
      """Check if exception is related to ECS resource quota (CPU, MEM)."""
      if isinstance(exception, EcsOperatorError):
          return any(
              quota_reason in failure["reason"]
              for quota_reason in ["RESOURCE:MEMORY", "RESOURCE:CPU"]
              for failure in exception.failures
          )
      return False
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from airflow.providers.amazon.aws.exceptions import EcsOperatorError, EcsTaskFailToStart
  from airflow.providers.amazon.aws.hooks.base_aws import AwsGenericHook
  from airflow.providers.amazon.aws.utils import _StringCompareEnum
  from airflow.typing_compat import Protocol, runtime_checkable
label_desc: Use image node_id 1 for calling a global function with example usage: should_retry(exception) and returns: False, any