Python Function Modify Input Process Storage