def resolve_cert_reqs(candidate):
 if (candidate is None):
  return CERT_NONE
 if isinstance(candidate, str):
  res = getattr(ssl, candidate, None)
  if (res is None):
   res = getattr(ssl, ('CERT_' + candidate))
  return res
 return candidate

def resolve_cert_reqs ( candidate ) : if ( candidate is None ) : return CERT_NONE if isinstance ( candidate , str ) : res = getattr ( ssl , candidate , None ) if ( res is None ) : res = getattr ( ssl , ( 'CERT_' + candidate ) ) return res return candidate
resolves the argument to a numeric constant .