def resolve_ssl_version(candidate):
if candidate is None:<EOL><INDENT>return PROTOCOL_SSLv23<EOL><DEDENT>if isinstance(candidate, str):<EOL><INDENT>res = getattr(ssl, candidate, None)<EOL>if res is None:<EOL><INDENT>res = getattr(ssl, '<STR_LIT>' + candidate)<EOL><DEDENT>return res<EOL><DEDENT>return candidate<EOL>
like resolve_cert_reqs