code: def rename(self, mapping):
          
          for old_key, new_key in mapping:
              self.dict[new_key] = self.dict[old_key]
              del self.dict[old_key]
docs: Rename fields
  
          :param mapping: a dict in the format {'oldkey1': 'newkey1', ...}