GH-125413: Add private pathlib.Path method to write metadata
#130238
+122
−174
Merged