def snappy_installed():
 try:
  import snappy
  return True
 except ImportError:
  return False
 except:
  logging.exception('failed to verify if snappy is installed')
  return False

def snappy_installed ( ) : try : import snappy return True except ImportError : return False except : logging . exception ( 'failed to verify if snappy is installed' ) return False
snappy is library that isnt supported by python2 .