<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inc(self):
 """Get index for new entry."""

        self.lock.acquire()
        cur = self.counter
        self.counter += 1
        self.lock.release()
        return cur