code: def check_ssl():
      
      try:
          import ssl
      except:
          log.warning('Error importing SSL module', stack_info=True)
          print(SSL_ERROR_MESSAGE)
          sys.exit(1)
      else:
          log.info('SSL module is available')
          return ssl
docs: Attempts to import SSL or raises an exception.