input: Write a python function to generate all palindromic permutations of a given string.
  assert set(all_palindromic_permutations("aab")) == {'aba'}
  assert set(all_palindromic_permutations("racecar")) == {'aceca', 'cec', 'racecar', 'arara', 'acca', 'rer'}
  assert set(all_palindromic_permutations("a")) == {'a'}
  assert set(all_palindromic_permutations("")) == {''}
output: def all_palindromic_permutations(s):
      from itertools import permutations
  
      def is_palindrome(word):
          return word == word[::-1]
      
      perms = set(permutations(s))
      palindromic_perms = {''.join(p) for p in perms if is_palindrome(''.join(p))}
      return palindromic_perms