def _prepare_lock(self):
        if self._lock is None:
            if self._use_manager:
                if self._manager is None:
                    self._manager = multip.Manager()
                # We need a lock that is shared by all processes.
                self._lock = self._manager.Lock()
            else:
                self._lock = multip.Lock()

        # Wrap around the storage service to allow the placement of locks around
        # the storage procedure.
        lock_wrapper = LockWrapper(self._storage_service, self._lock)
        self._traj.v_storage_service = lock_wrapper
        self._lock_wrapper = lock_wrapper
Render set maps, upload them to S3 and add to the database.
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py/MultiprocContext._prepare_lock--crossover with--dataset/ETHPy150Open openaddresses/machine/openaddr/ci/__init__.py/render_set_maps