code: def _open_icmp_socket(self, family):
          
          try:
              proto = socket.IPPROTO_ICMP if family == socket.AF_INET \
                      else _IPPROTO_ICMPV6
  
              return socket.socket(family, socket.SOCK_RAW, proto)
  
          except socket.error as e:
              if e.errno == 1:
                  raise MultiPingError("Root privileges required for sending "
                                       "ICMP")
              # Re-raise any other error
              raise
docs: Opens a socket suitable for sending/receiving ICMP echo
          requests/responses.