code: def test_invalid_retry_policy():
      retry_policies = [
          (-5, 2.0, 3, None),
          (5, -2.0, 3, None),
          (5, 2.0, -3, None),
          (5, 2.0, 21, None),
          (5, 2.0, None, -1),
          (5, 2.0, None, 14401),
          (5, 2.0, 10, 30),
      ]
  
      for (
          interval_sec,
          backoff_rate,
          max_attempts,
          expire_after,
      ) in retry_policies:
          try:
              RetryPolicy(
                  interval_seconds=interval_sec,
                  backoff_rate=backoff_rate,
                  max_attempts=max_attempts,
                  expire_after_mins=expire_after,
              ).to_request()
              assert False
          except Exception:
              assert True
  
imports: from __future__ import absolute_import
  from sagemaker.workflow.retry import RetryPolicy, StepRetryPolicy, SageMakerJobStepRetryPolicy, StepExceptionTypeEnum, SageMakerJobExceptionTypeEnum
label_desc: Use image node_id 4 for calling a global function with example usage: test_invalid_retry_policy() without return types