def METHOD_NAME(self, value, origin, min_prop, max_prop):
    MAX = getattr(self, max_prop)
    MIN = getattr(self, min_prop)
    # rudimentary min max flipping
    MAX, MIN = (MAX, MIN) if MAX >= MIN else (MIN, MAX)
    if MIN <= value <= MAX:
        self[origin] = value
    elif value > MAX:
        self[origin] = MAX
    else:
        self[origin] = MIN
    return None