def attrs_union(attrs1, attrs2):
    """Find a union of two dictionaries with attrs."""
    if attrs1 is None:
        if attrs2 is not None:
            return attrs2
        else:
            return {}
    if attrs2 is None:
        return attrs1
    res = dict()
    for key in attrs1:
        if key in attrs2:
            res[key] = attrs1[key].union(attrs2[key])
        else:
            res[key] = attrs1[key]
    for key in attrs2:
        if key not in attrs1:
            res[key] = attrs2[key]
    return res
