code: def test_permute_unique(self):
      nums1 = [1, 1, 2]
      answer1 = [[2, 1, 1], [1, 2, 1], [1, 1, 2]]
      self.assertEqual(sorted(permute_unique(nums1)), sorted(answer1))
  
      nums2 = [1, 2, 1, 3]
      answer2 = [
          [3, 1, 2, 1],
          [1, 3, 2, 1],
          [1, 2, 3, 1],
          [1, 2, 1, 3],
          [3, 2, 1, 1],
          [2, 3, 1, 1],
          [2, 1, 3, 1],
          [2, 1, 1, 3],
          [3, 1, 1, 2],
          [1, 3, 1, 2],
          [1, 1, 3, 2],
          [1, 1, 2, 3],
      ]
      self.assertEqual(sorted(permute_unique(nums2)), sorted(answer2))
  
      nums3 = [1, 2, 3]
      answer3 = [
          [3, 2, 1],
          [2, 3, 1],
          [2, 1, 3],
          [3, 1, 2],
          [1, 3, 2],
          [1, 2, 3],
      ]
      self.assertEqual(sorted(permute_unique(nums3)), sorted(answer3))
  
imports: from algorithms.backtrack import add_operators, permute_iter, anagram, array_sum_combinations, unique_array_sum_combinations, combination_sum, get_factors, recursive_get_factors, find_words, generate_abbreviations, generate_parenthesis_v1, generate_parenthesis_v2, letter_combinations, palindromic_substrings, pattern_match, permute_unique, permute, permute_recursive, subsets_unique, subsets, subsets_v2
  import unittest
label_desc: Use image node_id 1 for calling the TestPermuteUnique obj's underlying member method code with example usage: obj.test_permute_unique() without return types