The size of a document in Firestore is restricted upto 1MB, but I can't find any official Python code for calculateing it.
Then I developed this script based on the following official document.
https://firebase.google.com/docs/firestore/storage-size
pip install firebase-admin
pip install google-cloud-firestore