If using a python version < 3.6, f-strings don't work. The error message suggests a syntax error.
File "atlas-starter-2.py", line 54
print(f"I inserted {inserted_count} documents.")
^
SyntaxError: invalid syntax
Given our primary goal with this script, I'd suggest using a more widely used string formatting convention.