def host(value):
if not value:<EOL><INDENT>return (True, "<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>host,port = value.split("<STR_LIT::>")<EOL><DEDENT>except ValueError as _:<EOL><INDENT>return (False, "<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>int(port)<EOL><DEDENT>except ValueError as _:<EOL><INDENT>return (False, "<STR_LIT>")<EOL><DEDENT>return (True, "<STR_LIT>")<EOL>
Validates that the value is a valid network location