Python pls
3. Write and test the following function that uses a Stack:
1 2 3 4 5 6 7 8 9 10 11 12
def stack_reverse(source):
Reverses the contents of a stack. Use: stack_reverse(source)
Parameters: source - a Stack (Stack) Returns: None
Add the function to a PyDev module named functions.py. Test it from to3.py.
This function uses a stack, meaning you may manipulate the stack using only the stack interface methods: push, pop, is_empty, and peek. You may not use or refer to the internal Stack elements such as _values .