def pop(self, amount=1) -> Union[BitVec, List[BitVec]]:
        """Pops amount elements from the stack.

        :param amount:
        :return:
        """
        if amount > len(self.stack):
            raise StackUnderflowException
        values = self.stack[-amount:][::-1]
        del self.stack[-amount:]

        return values[0] if amount == 1 else values
def pop ( self , amount = 1 ) -> Union [ BitVec , List [ BitVec ] ] : if amount > len ( self . stack ) : raise StackUnderflowException values = self . stack [ - amount : ] [ : : - 1 ] del self . stack [ - amount : ] return values [ 0 ] if amount == 1 else values
Pops amount elements from the stack.

        :param amount:
        :return: