def _raise_error_network(option, expected):
 msg = _error_msg_network(option, expected)
 log.error(msg)
 raise AttributeError(msg)

def _raise_error_network ( option , expected ) : msg = _error_msg_network ( option , expected ) log . error ( msg ) raise AttributeError ( msg )
log and raise an error with a logical formatted message .