func_code: def swap_unique_keys_values(d):
      wards = {}
      bad = {}
      end = {}
      for k, v in list(d.items()):
          if v not in wards:
              wards[k] = v
          elif v in wards:
              del wards[k]
      return {v: k for k, v in list(wards.items())}