I often have functions that return multiple outputs which are structured like so:
def f(vars): ... if something_unexpected(): return None, None