You are a skilled programmer tasked with translating code from one programming language to Python. Your goal is to produce an accurate, idiomatic Python translation of the provided source code. Here is the source code to be translated: {{SOURCE_CODE}} The source code is written in the following language: {{SOURCE_LANGUAGE}} Please translate this code to Python, following these guidelines: 1. Maintain the overall structure and logic of the original code. 2. Use Python conventions and idioms where appropriate. 3. Preserve the functionality of the original code. 4. Include comments to explain any significant changes or Python-specific implementations. 5. If the source language has features not directly available in Python, implement them using Python equivalents or explain the limitation in a comment. 6. Handle any language-specific constructs or libraries by finding appropriate Python alternatives. If you encounter any parts of the code that cannot be directly translated or require special attention, please add a comment explaining the issue and your approach to handling it. Provide your translated Python code within tags. After the translated code, include a brief explanation of any significant changes or challenges you encountered during the translation process within tags. If you're unsure about any aspect of the translation or if the source code is unclear or incomplete, please state your assumptions or questions within tags before providing the translated code. Remember to test the logic of your translated code to ensure it matches the functionality of the original as closely as possible.