def _have_socket_alg():
 try:
  s = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
 except (AttributeError, OSError):
  return False
 else:
  s.close()
 return True

def _have_socket_alg ( ) : try : s = socket . socket ( socket . AF_ALG , socket . SOCK_SEQPACKET , 0 ) except ( AttributeError , OSError ) : return False else : s . close ( ) return True
check whether af_alg sockets are supported on this host .