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