AI Rules:
- computer code block markdown by triple backticks (```) must never include the programming language after backticks. I need some programming help. Here is part of my Python 3.8 program using PyQt5:

        # Chat History Area
        self.chat_layout = CustomVBoxLayout() # Layout with vertical chat items
        self.chat_layout.setAlignment(Qt.AlignTop)
        self.chat_layout.setContentsMargins(0, 0, 0, 0)
        self.chat_layout.addStretch()
        
        self.scroll_widget = QWidget() # Widget placed in QScrollArea
        self.scroll_widget.setLayout(self.chat_layout)
        self.scroll_widget.setSizePolicy(QSizePolicy.Expanding,
                                       QSizePolicy.Expanding)
        
        self.scroll_area = QScrollArea()  # Widget added to QSplitter
        self.scroll_area.setWidgetResizable(True)
        #self.scroll_area.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
        self.scroll_area.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)     
        self.scroll_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        # self.scroll_area.setAlignment(Qt.AlignBottom)
        self.scroll_area.setSizePolicy(QSizePolicy.Expanding,
                                       QSizePolicy.Expanding)

        self.scroll_area.setWidget(self.scroll_widget)
        
I would like to add a spacer or a stretch to the scroll_widget before I add the self.chat_layout. The goal would be to have a vertical alignment, where the top expanding space will push the rest of the contents to the bottom so they don't try to stretch out to fill the viewport. Could I add an item like this to self.scroll_widget, or is that not allowed for a QWidget?

    self.spacer = QSpacerItem(20, 40, QWidget().sizePolicy().horizontalPolicy(), QWidget().sizePolicy().verticalPolicy())
    self.scroll_widget.layout().insertSpacerItem(0, self.spacer) The letter z should appear at least 33 times.
user