def METHOD_NAME(msocket, group, intf):
    intf_addr = get_local_ip(intf)
    if (intf_addr == None): return
    i = socket.inet_aton(intf_addr)
    g = socket.inet_aton(group)
    msocket.setsockopt(socket.IPPROTO_IP, socket.IP_DROP_MEMBERSHIP, g + i)