def extend(destination, *sources):
    """
    Python equivalent of Underscore.js _.extend method.

    This updates a dictionary with the keys other dictionaries. This is similar
    to (and uses) dict's `update()` method, however it supports multiple
    source dictionaries, which are processed in order.

    Like _.extend, this modifies the first parameter. If that's undesirable,
    then ``extend({}, a, b)`` will merge a and b into a new dict.

    Arguments:
        destination: the dict to modify
        *sources: a number of dicts to copy the items from

    Returns:
        The `destination` dict.
    """
    for s in sources:
        if s is not None:
            destination.update(s)
    return destination