Here's the syntax I used, I encounter an exception when the third line is executed.
fire_client = firestore.Client()
def_ref = fire_client.collection('collection_parent').document('document1').set({"key":"value"})
msg_ref = def_ref.collection('collection_child').document('document2').set({"key1":"value1"})