def merge_dicts(*dicts):
    """Shallow copy and merge any number of input dicts.

    Precedence goes to key value pairs in latter dicts.

    Parameters
    ----------
    dicts : dict1, dict2, ...
        Any sequence of dict objects to merge.

    Examples
    --------
    >>> from secml.utils import merge_dicts

    >>> d1 = {'attr1': 100, 'attr2': 200}
    >>> d2 = {'attr3': 300, 'attr1': 999}  # Redefining `attr1`

    >>> merge_dicts(d1, d2)  # Value of `attr1` will be set according to `d2` dictionary
    {'attr3': 300, 'attr2': 200, 'attr1': 999}

    """
    result = {}
    for dict_i in dicts:
        result.update(dict_i)
    return result