<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def position_before(self, instr):
 """ Position immediately before the given instruction. The current block is also changed to the instruction's basic block. """

        self._block = instr.parent
        self._anchor = self._block.instructions.index(instr)