<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lock_area(self, code, index):
 """Locks a shared memory area. """

        logger.debug("locking area code %s index %s" % (code, index))
        return self.library.Srv_LockArea(self.pointer, code, index)