def merge(*dicts):
    """Given any number of dicts, shallow copy and merge into a new dict,
    precedence goes to key value pairs in latter dicts."""
    result = {}
    for d in dicts:
        result.update(d)
    return result
