A lightweight network emulator embedded in a small python library