also, I'd write this as:
`device_info = device_info or self.select_device(tenant_id=tenant_id)`

Operators `and` and `or` will evaluate to whichever object ends the valuation.
Operators `&&`, `||` and friends always return a bool.