def merge_dicts(*dicts):
    """
    Copy and merge given dicts into a new dict, precedence goes to key value
    pairs in latter dicts.
    """
    result = {}
    for d in dicts:
        result.update(d)
    return result
