I'll amend the Python version to match the Scala one.