Queue Python Code Using Functions To Model