code: def ping(self, url):
      
      return self._get_ping_time(url, self._timeout, self._tries)
docs: Time a single roundtrip to the url.
  
      :param url to ping.
      :returns: the fastest ping time for a given netloc and number of tries.
      or Pinger.UNREACHABLE if ping times out.
      :rtype: float
  
      Note that we don't use actual ICMP pings, because cmd-line ping is
      inflexible and platform-dependent, so shelling out to it is annoying,
      and the ICMP python lib can only be called by the superuser.