Create record_and_replay.py