Is it considered bad practice to recreate the Firestore db client inside functions? Is the following bad practice?