def _error_msg_network(option, expected):
 msg = 'Invalid network setting -- Setting: {0}, Expected: [{1}]'
 return msg.format(option, '|'.join(expected))

def _error_msg_network ( option , expected ) : msg = 'Invalid network setting -- Setting: {0}, Expected: [{1}]' return msg . format ( option , '|' . join ( expected ) )
build an appropriate error message from a given option and a list of expected values .