import random
import time


def ping_ip(ip):
    """Pings an IP, duh. Sleeps randomly if it fails. Duh."""
    n = random.randrange(0,4)
    if not n:
        time.sleep(random.random())
        return False
    return True