code: def rename(dct, mapping):
      
  
      def _block(memo, key):
          if key in dct:
              memo[mapping[key]] = dct[key]
              return memo
          else:
              return memo
      return reduce(_block, mapping, omit(dct, *mapping.keys()))
docs: Rename the keys of a dictionary with the given mapping
  
          >>> rename({"a": 1, "BBB": 2}, {"a": "AAA"})
          {'AAA': 1, 'BBB': 2}