What is your Python version? Splice was added in 3.10.
https://docs.python.org/3/library/os.html#os.splice
Edited with an update.
Edited with an update.