Write a C function to set, clear, and toggle specific bits in a 32-bit hardware register at Benchmark Space Systems.
Implement the equivalent function modify_register(register_value, mask, operation), where all values are unsigned 32-bit integers and operation is "set", "clear", or "toggle". Return the updated 32-bit register value. The mask identifies which bits to modify; all unmasked bits must remain unchanged.
def modify_register(register_value, mask, operation):