Explain how synchronized collections work and how you would use them to handle multithreading and database-related concerns. Implement a function that applies batches of collection operations from separate threads while guaranteeing that each batch is atomic and batches commit in input order. The function receives batches, a list of operation lists, where each operation is ["add" or "remove", value]; it returns the final collection as a sorted list. Values are strings, and invalid operations are not provided.
def synchronized_collection(batches):