<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_layout(self, orientation=None):
 """Setup the layout for the tooltip in the given orientation :param layout: the orentation of the layout :type layout: QtCore.Qt.Orientation | None :returns: None :rtype: None :raises: None """

        if orientation == QtCore.Qt.Horizontal or orientation is None:
            layout = QtGui.QHBoxLayout()
        elif orientation == QtCore.Qt.Vertical:
            layout = QtGui.QVBoxLayout()
        else:
            raise TypeError('Orientation is of wrong type! Allowed is QtCore.Qt.Horizontal and QtCore.Qt.Vertical. Given: %s' % orientation)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.setSpacing(0)
        self.setLayout(layout)