`get_attribute` returns string which could be "true" or "false".
`value == 'true' and True or False` can be rewritten to `True if value == 'true' else False` but it's the same.

That based on short circuit:
`x and y` returns `y` if `x` is True else returns `x`
`x or y` returns `x` if `x` is True else returns `y`