def _bool_fallback(a, b):
 if (a is None):
  assert isinstance(b, bool)
  return b
 else:
  assert isinstance(a, bool)
  return a

def _bool_fallback ( a , b ) : if ( a is None ) : assert isinstance ( b , bool ) return b else : assert isinstance ( a , bool ) return a
given a boolean or none .