code: def xfail_if_model_type_is_not_exportedprogram(reason: str):
      """xfail test without models using ExportedProgram as input.
  
      Args:
          reason: The reason for xfail the ONNX export test.
  
      Returns:
          A decorator for xfail tests.
      """
  
      def xfail_dec(func):
          @functools.wraps(func)
          def wrapper(self, *args, **kwargs):
              if (
                  self.model_type
                  != TorchModelType.TORCH_EXPORT_EXPORTEDPROGRAM
              ):
                  pytest.xfail(
                      reason=f"Xfail model_type!=torch.export.ExportedProgram. {reason}"
                  )
              return func(self, *args, **kwargs)
  
          return wrapper
  
      return xfail_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 17 for calling a global function with example usage: xfail_if_model_type_is_not_exportedprogram(reason) and returns: xfail_dec, wrapper, func