<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stack_read(self, offset, length, bp=False):
 """ Reads length bytes, at an offset into the stack. :param offset: The offset from the stack pointer. :param length: The number of bytes to read. :param bp: If True, offset from the BP instead of the SP. Default: False. """

        sp = self.regs.bp if bp else self.regs.sp
        return self.memory.load(sp+offset, length, endness=self.arch.memory_endness)