def changekeys(map, keymap, replace=False):
    """
    Return a copy of map with the name of the keys changed according to the
    given keymap.

    Example:
        >>> changekeys({1: 2, 3: 4}, {1: 3, 3: 1})
        {3: 2, 1: 4}
    """
    return NotImplemented
