def METHOD_NAME(self, num_items: int) -> Tuple[bytes, ...]:
    #
    # Note: This function is optimized for speed over readability.
    #
    if num_items > len(self.values):
        raise InsufficientStack(
            "Wanted %d stack items, only had %d",
            num_items,
            len(self.values),
        )
    else:
        neg_num_items = -1 * num_items
        all_popped = reversed(self.values[neg_num_items:])
        del self.values[neg_num_items:]
        type_cast_popped = []
        # Convert any non-matching types to the requested type (int)
        # This doesn't use the @to_tuple(generator) pattern, for added performance
        for item_type, popped in all_popped:
            if item_type is int:
                type_cast_popped.append(int_to_big_endian(popped))  # type: ignore
            elif item_type is bytes:
                type_cast_popped.append(popped)  # type: ignore
            else:
                raise _busted_type(item_type, popped)
        return tuple(type_cast_popped)