<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def async_saves(cls):
 """ Returns a context manager to allow asynchronously creating subjects. Using this context manager will create a pool of threads which will create multiple subjects at once and upload any local files simultaneously. The recommended way to use this is with the `with` statement:: with Subject.async_saves():
 for filename in local_files: s = Subject() s.links.project = 1234 s.add_location(filename) s.save() Alternatively, you can manually shut down the thread pool:: pool = Subject.async_saves() try: for filename in local_files: s = Subject() s.links.project = 1234 s.add_location(filename) s.save() finally: pool.shutdown() """

        cls._local.save_exec = ThreadPoolExecutor(
            max_workers=ASYNC_SAVE_THREADS
        )
        return cls._local.save_exec