Prompt: Describe the following function step by step in natural language so that your description creates a prompt instruction which would generate the same output as the function given the inputs that are given to the function. Include all functionalities that the function has in your prompt: {{Code function}}