def setdeepr(obj, name, value):
    """Function to set deeper attributes, replaces setattr."""
    names = name.split('.')
    for name in names[:-1]:
        obj = getattr(obj, name)
    return setattr(obj, names[-1], value)