The following link maybe helpful.

https://github.com/davidbombal/red-python-scripts/blob/main/arp_mitm.py