code: def _is_pingable(ip):
      
      ping_cmd = ['ping',
                  '-c', '5',
                  '-W', '1',
                  '-i', '0.2',
                  ip]
      try:
          linux_utils.execute(ping_cmd, check_exit_code=True)
          return True
      except RuntimeError:
          LOG.warning("Cannot ping ip address: %s", ip)
          return False
docs: Checks whether an IP address is reachable by pinging.
  
      Use linux utils to execute the ping (ICMP ECHO) command.
      Sends 5 packets with an interval of 0.2 seconds and timeout of 1
      seconds. Runtime error implies unreachability else IP is pingable.
      :param ip: IP to check
      :return: bool - True or False depending on pingability.