Define Layout Manager In Python A Function Within A Class