Use the smart_open library.
Use the smart_open library.