code: def unique_permutations(elements):
      """Return the list of unique permutations."""
      if len(elements) == 1:
          yield (elements[0],)
      else:
          unique_elements = set(elements)
          for first_element in unique_elements:
              remaining_elements = list(elements)
              remaining_elements.remove(first_element)
              for sub_permutation in unique_permutations(
                  remaining_elements
              ):
                  yield (first_element,) + sub_permutation
  
imports: import sys
  import math
  import numpy
  from .utils.utils import check_version
  from .utils.distance import distance, pairwise_distance
  from .utils.mean import mean_covariance
  from .classification import MDM, _check_metric
label_desc: Use image node_id 2 for calling a global function with example usage: unique_permutations(elements) without return types