Acquire lock for dvc repo.

def lock(self):
        """Acquire lock for dvc repo."""
        try:
            self._do_lock()
            return
        except LockError:
            time.sleep(self.TIMEOUT)

        self._do_lock()