def _merge_dicts(*dicts):
    """Merge any number of dictionaries, some of which may be None."""
    final = {}
    for dict in dicts:
        if dict is not None:
            final.update(dict)
    return final