def _prepare_lock(self):
        """ Replaces the trajectory's service with a LockWrapper """
        if self._lock is None:
            if self._use_manager:
                if self._manager != 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
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py/MultiprocContext._prepare_lock/operator `is` -> `!=`