code: def _sort_eps(eps: Tuple[str, ...]) -> Tuple[str, ...]:
      """Sort execution providers in eps based on pre-set priority."""
  
      def get_execution_provider_priority(ep: str) -> int:
          if ep == "CPUExecutionProvider":
              # Lowest priority.
              return 2
          if ep == "CUDAExecutionProvider":
              # Higher priority than CPU but lower than
              # other specialized EPs.
              return 1
          # Highest priority.
          return 0
  
      unique_eps = set(eps)
      return tuple(
          sorted(
              unique_eps,
              key=get_execution_provider_priority,
              reverse=True,
          )
      )
  
imports: import dataclasses
  import importlib
  import logging
  from typing import Any, Dict, Final, List, Mapping, Optional, Sequence, Set, Tuple, Union
  from typing_extensions import TypeAlias
  import torch
  import torch._C
  import torch._ops
  import torch._prims.executor
  import torch.fx
  from torch._subclasses.fake_tensor import FakeTensor
  from torch.fx._compatibility import compatibility
  from torch.fx.passes.fake_tensor_prop import FakeTensorProp
  from torch.fx.passes.operator_support import OperatorSupport
  from torch.fx.passes.tools_common import CALLABLE_NODE_OPS
  from torch.utils import _pytree
label_desc: Use image node_id 11 for calling a global function with example usage: _sort_eps(eps) and returns: tuple, int, int, int