code: def skip_dynamic_fx_test(
      reason: str, skip_model_type: TorchModelType = None
  ):
      """Skip dynamic exporting test.
  
      Args:
          reason: The reason for skipping dynamic exporting test.
          skip_model_type (TorchModelType): The model type to skip dynamic exporting test for.
              When None, model type is not used to skip dynamic tests.
  
      Returns:
          A decorator for skipping dynamic exporting test.
      """
  
      def skip_dec(func):
          @functools.wraps(func)
          def wrapper(self, *args, **kwargs):
              if self.dynamic_shapes and (
                  not skip_model_type
                  or self.model_type == skip_model_type
              ):
                  raise unittest.SkipTest(
                      f"Skip verify dynamic shapes test for FX. {reason}"
                  )
              return func(self, *args, **kwargs)
  
          return wrapper
  
      return skip_dec
  
imports: from __future__ import annotations
  import functools
  import os
  import random
  import sys
  import unittest
  from enum import auto, Enum
  from typing import Optional
  import numpy
  import packaging.version
  import pytest
  import torch
  from torch.autograd import function
  from torch.onnx._internal import diagnostics
  from torch.testing._internal import common_utils
label_desc: Use image node_id 8 for calling a global function with example usage: skip_dynamic_fx_test(reason, skip_model_type) and returns: skip_dec, wrapper, func