How to ping a server using Snaplogic

Is it possible to ping a server and check if it is up or down using the script snap with some python or js code? How it can be and works?