<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <small><i>This notebook was prepared by Donne Martin. Source and license info is on GitHub.</i></small>
Challenge Notebook
Problem
Step1:  Unit Test
The following unit test is expected to fail until you solve the challenge.
<ASSISTANT_TASK:>
Python Code:
%run ../stack/stack.py
%load ../stack/stack.py
import sys
class MyStack(Stack):
    def __init__(self, top=None):
        # TODO: Implement me
        pass
    def min(self):
        # TODO: Implement me
        pass
    def push(self, data):
        # TODO: Implement me
        pass
    def pop(self):
        # TODO: Implement me
        pass
Explanation: <small><i>This notebook was prepared by Donne Martin. Source and license info is on GitHub.</i></small>
Challenge Notebook
Problem: Implement a stack with push, pop, and min methods running O(1) time.
Constraints
Test Cases
Algorithm
Code
Unit Test
Solution Notebook
Constraints
Can we assume this is a stack of ints?
Yes
If we call this function on an empty stack, can we return maxsize?
Yes
Can we assume we already have a stack class that can be used for this problem?
Yes
Test Cases
Push/pop on empty stack
Push/pop on non-empty stack
Algorithm
Refer to the Solution Notebook.  If you are stuck and need a hint, the solution notebook's algorithm discussion might be a good place to start.
Code
End of explanation
# %load test_stack_min.py
from nose.tools import assert_equal
class TestStackMin(object):
    def test_stack_min(self):
        print('Test: Push on empty stack, non-empty stack')
        stack = MyStack()
        stack.push(5)
        assert_equal(stack.peek(), 5)
        assert_equal(stack.min(), 5)
        stack.push(1)
        assert_equal(stack.peek(), 1)
        assert_equal(stack.min(), 1)
        stack.push(3)
        assert_equal(stack.peek(), 3)
        assert_equal(stack.min(), 1)
        stack.push(0)
        assert_equal(stack.peek(), 0)
        assert_equal(stack.min(), 0)
        print('Test: Pop on non-empty stack')
        assert_equal(stack.pop(), 0)
        assert_equal(stack.min(), 1)
        assert_equal(stack.pop(), 3)
        assert_equal(stack.min(), 1)
        assert_equal(stack.pop(), 1)
        assert_equal(stack.min(), 5)
        assert_equal(stack.pop(), 5)
        assert_equal(stack.min(), sys.maxsize)
        print('Test: Pop empty stack')
        assert_equal(stack.pop(), None)
        print('Success: test_stack_min')
def main():
    test = TestStackMin()
    test.test_stack_min()
if __name__ == '__main__':
    main()
Explanation: Unit Test
The following unit test is expected to fail until you solve the challenge.
End of explanation
<END_TASK>