input: Write a Python function to implement a stack data structure with push, pop, peek, is_empty, and size methods.
  ```python
  class Stack(object):
      def __init__(self):
          self.items = []
  
      def push(self, item):
          self.items.append(item)
  
      def pop(self):
          if not self.is_empty():
              return self.items.pop()
  
      def peek(self):
          if not self.is_empty():
              return self.items[-1]
  
      def is_empty(self):
          return len(self.items) == 0
  
      def size(self):
          return len(self.items)
  
  stack = Stack()
  assert stack.is_empty() == True
  stack.push(1)
  stack.push(2)
  assert stack.size() == 2
  assert stack.peek() == 2
  assert stack.pop() == 2
  assert stack.size() == 1
  assert stack.pop() == 1
  assert stack.is_empty() == True
output: class Stack(object):
      def __init__(self):
          self.items = []
  
      def push(self, item):
          self.items.append(item)
  
      def pop(self):
          if not self.is_empty():
              return self.items.pop()
  
      def peek(self):
          if not self.is_empty():
              return self.items[-1]
  
      def is_empty(self):
          return len(self.items) == 0
  
      def size(self):
          return len(self.items)
  
  stack = Stack()
  assert stack.is_empty() == True
  stack.push(1)
  stack.push(2)
  assert stack.size() == 2
  assert stack.peek() == 2
  assert stack.pop() == 2
  assert stack.size() == 1
  assert stack.pop() == 1
  assert stack.is_empty() == True