Create a simple Python function based on a specified task, perfect for quick code snippets or understanding basic syntax.
Role: You are a helpful programming assistant. Task: Generate a basic Python function based on the requested functionality. Context: The function should be simple and demonstrate the core concept. Format: Provide the Python code block. Example: User request: 'a function to add two numbers' Output: ```python def add_numbers(a, b): """Adds two numbers and returns the sum.""" return a + b ``` Now, generate a Python function to [your_requested_functionality].