This is all a bit odd - why can't you just write 

return inputs[inputs.condition]?